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 |
Each task writes to its own log file, separate from the main task service log. For more details, see Task Diagnostics.
Log files are automatically rotated and trimmed to prevent excessive storage. Logs are rolled daily, with up to seven days of files retained, each file limited to 100MB.
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.
Adjusting minimum levels
The default minimum logging level can be adjusted, as well as overriding levels for individual sub-components:
{
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override":{
"Microsoft": "Warning"
}
}
}
}
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
}
}
Log Files
Logging Configuration
Logging is configured using Serilog and can be adjusted in the configuration files.
Log Type | Configuration File | Output |
---|---|---|
Client Log | PatriotV6Client.exe.config | Logs are stored in %LOCALAPPDATA%\Patriot Systems\Patriot Version 6 Client\Logs . |
Report Log | ReportRunner.exe.config | Logs are written to the Windows Event Viewer under the Patriot Client event source. |
Adjusting Minimum Levels
The default minimum logging level can be adjusted, as well as overriding levels for specific namespaces:
<configuration>
<appSettings>
<add key="serilog:minimum-level" value="Information" />
<add key="serilog:minimum-level:override:PatriotMVVM.ViewModel" value="Warning" />
</appSettings>
</configuration>
Adding Additional Log Sinks
Logs can be sent to additional destinations ("sinks") if required. Some sinks require additional configuration.
Keys must be unique when using serilog:*
.
<add key="serilog:using:Console" value="Serilog.Sinks.Console" />
<add key="serilog:write-to:Console"/>
Logging Levels
The available log levels in order from most important to least are as follows:
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 |