Logging
- Last UpdatedFeb 20, 2025
- 2 minute read
- PI System
- Adapter for DNP3 1.2
- Adapters
AVEVA adapters write daily log messages for the adapter, the system, and OMF egress to flat text files in the following locations:
-
Windows: %ProgramData%\OSIsoft\Adapters{AdapterInstance}\Logs
-
Linux: /usr/share/OSIsoft/Adapters/{AdapterInstance}/Logs
Each message in the log displays the message severity level, timestamp, and the message itself.
To configure logging:
-
Initialize the configuration using the PUT method in conjunction with the http://localhost:5590/api/v1/configuration/<ComponentId>/Logging REST endpoint.
-
Using a text editor, create an empty text file.
-
Copy and paste an example configuration for logging into the file. For sample JSON, see the Logging example.
-
Update the example JSON parameters for your environment. See Logging parameters for a table of all available parameters.
-
Save the file. For example, ConfigureLogging.json.
-
Open a command line session. Change directory to the location of ConfigureLogging.json.
-
Enter the following cURL command (which uses the PUT method) to initialize the logging configuration.
curl -d "@ConfigureLogging.json" -H "Content-Type: application/json" -X PUT "http://localhost:5590/api/v1/configuration/<ComponentId>/Logging"
Note: If you installed the adapter to listen on a non-default port, update 5590 to the port number in use.
For a list of other REST operations you can perform, like updating or retrieving a logging configuration, refer to the URL table below.
Any parameter not specified in the updated configuration file reverts to the default schema value.
On successful execution, the log-level change takes effect immediately during runtime. The other configurations (log file size and file count) are updated after the adapter is restarted.
REST URLs
|
Relative URL |
HTTP verb |
Action |
|---|---|---|
|
api/v1/configuration/System/Logging |
GET |
Retrieves the system logging configuration |
|
api/v1/configuration/System/Logging |
PUT |
Updates the system logging configuration |
|
api/v1/configuration/ComponentId/Logging |
GET |
Retrieves the logging configuration of the specified adapter component |
|
api/v1/configuration/ComponentId/Logging |
PUT |
Updates the logging configuration of the specified adapter component |
Note: Replace ComponentId with the Id of your adapter component.