Results Services Logging
Logging of information is important for troubleshooting of services. The following logging options are available:
- Event: Common for windows-based systems. However, it is not recommended to log more debug or trace information to the event log.
- Console: The default for Docker-based systems.
- File: Allows more detailed logging into rolling files.
- ApplicationInsight: A Microsoft Azure technology that can be used for logging and monitoring.
- MinimumLevel: Set the level that is sent to the log. The available options are:
- Critical
- Error
- Warning
- Information
- Debug
- Trace
- None
- EnableAppInsight: Set to "True" to use Application Insights
- InsightKey: The key of an Application Insights Instance
- EventLogRestictedToMinimumLevel: Set the minimum level for event log logging
- EventLogManagedEventSource: Set to "True" for the service to register the event source. This requires local admin rights for the user running the services.
- WriteTo:
- Enrich:
"Serilog": {
"Using": [ "Serilog.Sinks.Console" ],
"MinimumLevel": "Information",
"EnableAppInsight": false,
"InsightKey": "",
"EventLogRestrictedToMinimumLevel": "Warning",
"EventLogOutputTemplate": "{Message}{NewLine}{Exception}",
"EventLogManageEventSource": false,
"WriteTo": [
{ "Name": "Console" },
{
"Name": "File",
"Args": {
"path": ".\\Logs\\ResultSenderLog_.txt",
"outputTemplate": "{Timestamp:o} [{Level:u3}] ({Application}/{MachineName}) {Message}{NewLine}{Exception}",
"rollingInterval": "Day",
"fileSizeLimitBytes": "2097152",
"rollOnFileSizeLimit": true,
"retainedFileCountLimit": 2000
}
}
],
"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ],
"Properties": {
"Application": "ATS.CM4D.ResultsSender",
"MachineName": "MachineATS"
}
}
Can we improve this topic?