By default, the log level is set to Warn, which means that warnings, as well as critical and non-critical errors, are logged. To change the detail level of the log messages, modify the application settings configuration file, appsettings.json. To configure any other aspect of logging, modify the file nlog.config in the same folder.
Procedure
- Go to the bin\ subfolder of the root folder where the Access Management service is installed.
- To set the detail level of the log being produced, do the following:
- Open appsettings.json for editing.
- In the
Logging section, within the LogLevel subsection, find the Default property and set its value to one of the following values:
| Log level | Description |
|---|
Trace | Log informational messages with the highest level of detail about the application's lowest-level activity. |
Debug | Log fine-grained informational messages about low-level functionality being executed, intended to discover the source of a problem. |
Information | Log warnings, errors of both types, and informational messages. |
Warning | Log warnings as well as errors of both types. |
Error | Log critical errors and normal errors. |
Critical | Log only critical errors. |
- Save and close appsettings.json.
- Open NLog.config for editing.
By default, log messages are logged both to console and to file, and the file target is a rolling log, producing a new file every 1,000,000 bytes. You can modify this behavior by changing the following settings:
- Logging locations
- Log file names
- Log message format
For more information on all NLog settings and features, refer to the NLog configuration file documentation.