Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

PI OPC UA Server

Logging

  • Last UpdatedMar 30, 2026
  • 2 minute read
    • Developer

The server uses structured logging to record runtime activity, diagnostics, and errors. Logs are written in CLEF (Compact Log Event Format), a compact JSON format for easy parsing and integration with log aggregation tools. Structured logging enables collection of logs from multiple components, machines, or services into a single centralized system for analysis.

Log file location

The log files are stored in a platform-specific configuration directory under a logs subdirectory:

  • Windows: %ProgramData%\AVEVA\AVEVA PI OPC UA Server\logs\

Log File Naming Convention

Log files, generated each day, use a daily rolling format with the following naming pattern log-yyyyMMdd.json.

Configuration

Configuration occurs using two methods, using the Configurator and/or by carefully editing the %ProgramData%\AVEVA\AVEVA PI OPC UA Server\usersettings.json file.

AVEVA Configurator configuration

See AVEVA PI OPC UA Server configuration for how to update the Log Level and Retained Log Files settings. Because the service supports dynamic log level changes, any log level update is immediately implemented.

Log Level definitions

The base log level setting for all categories is Information.

Log Level

Description

Usage

Trace

Most detailed logging

Fine-grained debugging, trace execution flow

Debug

Detailed diagnostic information

Development and troubleshooting

Information

General informational messages

Normal application flow (default)

Warning

Indicates potential issues

Unexpected but recoverable conditions

Error

Error events that allow application to continue

Exceptions and failures

Critical

Critical failures requiring immediate attention

Application crashes, data loss

None

Disables logging

Not recommended for production

Custom Sinks

Additional sinks can be added in %ProgramData%\AVEVA\AVEVA PI OPC UA Server\usersettings.json file in the Serilog:WriteTo section. Using an editor, open the file and update using the example shown here:

{

"Serilog":{

"Using":[

"Serilog.Sinks.Seq",

"Serilog.Sinks.Datadog.Logs"

],

"WriteTo":[

{

"Name":"Seq",

"Args":{

"serverUrl":"http://localhost:5341"

}

},

{

"Name":"DatadogLogs",

"Args":{

"apiKey":"YOUR_DATADOG_API_KEY",

"configuration":{

"url":"intake.logs.datadoghq.com",

"port":10516,

"useSSL":true,

"useTCP":true

}

}

}

]

}

}

Note: The default WriteTo array is empty [], allowing the code-configured sinks (Console and File) to take precedence. Logging sinks for Seq and Datadog are supported out of the box. Additional steps are needed to support other logging sinks. Please contact support if you need to configure a different logging vendor.

In This Topic
TitleResults for “How to create a CRG?”Also Available in