How do I write logs from within Startup.cs?

前端 未结 10 1421
伪装坚强ぢ
伪装坚强ぢ 2020-12-01 04:16

In order to debug a .NET Core app which is failing on startup, I would like to write logs from within the startup.cs file. I have logging setup within the file that can be u

10条回答
  •  天涯浪人
    2020-12-01 04:37

    Just use the line below for logging in Startup.cs

    Log.Information("App started.");
    

提交回复
热议问题