The 'Logging' section contains the configuration for logging in an application. It has a 'LogLevel' sub-section that specifies the log levels for different categories or namespaces.

In this example:

  • The 'Default' log level is set to 'Information'. This means that all log messages with a log level of 'Information' or higher will be logged.
  • The 'Microsoft' log level is set to 'Warning'. This means that only log messages with a log level of 'Warning' or higher from the 'Microsoft' category will be logged.
  • The 'Microsoft.Hosting.Lifetime' log level is set to 'Information'. This means that all log messages with a log level of 'Information' or higher from the 'Microsoft.Hosting.Lifetime' category will be logged.
Logging Configuration in Applications

原文地址: https://www.cveoy.top/t/topic/qhk7 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录