Skip to main content
Version: 6.12

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.

ComponentSource(s)
Data ServicePatriot Data Service, PatriotDataService
Task ServicePatriot Task Service, PatriotCSMService
ClientPatriot Client
note

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.

ComponentDefault Logging Location
Data ServiceC:\Program Files (x86)\Patriot Systems\Patriot Data Service\Logs
Task ServiceC:\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:

appSettings.json
{
"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.

appSettings.json
{
"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)

appSettings.json
{
"Logging": {
"DisableDefaultFileLogging": true
}
}

Log Files

Logging Configuration

Logging is configured using Serilog and can be adjusted in the configuration files.

Log TypeConfiguration FileOutput
Client LogPatriotV6Client.exe.configLogs are stored in %LOCALAPPDATA%\Patriot Systems\Patriot Version 6 Client\Logs.
Report LogReportRunner.exe.configLogs 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:

App.config
<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.

note

Keys must be unique when using serilog:*.

App.config
<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:

LevelDescription
FatalCritical errors that require immediate attention
ErrorGeneral errors affecting application functionality
WarningAlerts or messages which may indicate a problem
InformationGeneral informational messages about system activity
DebugAdditional diagnostic information or details
VerboseVerbose activity messages