System Troubleshooting
Windows Event Log
Check Windows Event Log for errors (Control Panel, Administrative Tools, Event Viewer). Patriot logs to the Application log. Both services and the client will log there for errors.
Component | Source(s) |
---|---|
Data Service | Patriot Data Service , PatriotDataService |
Task Service | Patriot Task Service , PatriotCSMService |
Client | Patriot Client |
Administrative privileges are required to setup the source in the event log. If you aren't getting any entries in the event log, try logging into the machine as an administrator, and starting up the Patriot client (run as administrator). This should setup the source in the event log and allow other users to then write to it.
Service Log Files
The Patriot Data Service and Patriot Task Service both generate log files in their respective install directories.
Component | Default Logging Location |
---|---|
Data Service | C:\Program Files (x86)\Patriot Systems\Patriot Data Service\Logs |
Task Service | C:\Program Files (x86)\Patriot Systems\Patriot Task Service\Logs |
The log files are automatically rotated and trimmed to avoid storing too much data.
Extending Logging
The default log levels are set to balance log information against the log file size. If required, log settings can be adjusted by adding to the appSettings.json
.
Logging is configured using Serilog, and can be adjusted as per their documentation at https://github.com/serilog/serilog-settings-configuration
Adjusting minimum levels
The default minimum level can be adjusted, as well as overriding levels for individual sub-components:
{
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override":{
"Microsoft": "Warning"
}
}
}
}
The available log levels in order from most important to least are:
Level | Description |
---|---|
Fatal | Critical errors that require immediate attention |
Error | General errors affecting application functionality |
Warning | Alerts or messages which may indicate a problem |
Information | General informational messages about system activity |
Debug | Additional diagnostic information or details |
Verbose | Verbose activity messages |
Adding additional log sinks
Logs can be sent to additional destinations ("sinks") if required. Some sinks require additional configuration.
{
"Serilog": {
"WriteTo": {
"OpenTelemetry": {
"Name": "OpenTelemetry"
}
}
}
}
Disabling Default Log Files
The default log files can be disabled if required (not recommended unless logging is being redirected to another system)
{
"Logging": {
"DisableDefaultFileLogging": true
}
}