CONNECT to PI Agent logs
- Last UpdatedMar 17, 2025
- 3 minute read
- CONNECT
- CONNECT to PI Agent
- Agents
- PI Server
The CONNECT to PI Agent writes daily log messages for the agent, the system, individual transfers, and OMF egress to flat text files in the following location:
%ProgramData%\OSIsoft\Adapters\CONNECT\Logs
Each message in the log displays the message severity level, timestamp, and the message itself.
Optionally, you can change the Log Level for each of these components via programmatic means using REST API calls. The most commonly used tools are Postman and Edge Command Utility.
To configure logging:
-
Using a text editor, create an empty text file.
-
Copy and paste the following example configuration for logging into the file:
{
"logLevel": "Information",
"logFileSizeLimitBytes": 34636833,
"logFileCountLimit": 31
}
-
Update the example JSON parameters for your environment. See Logging parameters below for a table of all available parameters.
-
Save the file. For example, ConfigureLogging.json.
-
To initialize the logging configuration, send the ConfigureLogging.json content as request body by Postman (which uses the PUT method) to "http://localhost:5590/api/v1/configuration/<ComponentId>/Logging". You can change the Log Level for the following components:
-
System
-
OmfEgress
-
Individual Transfers
-
Log levels
The following table describes the severity levels for messages.
|
Level |
Description |
|---|---|
|
Trace |
Logs that contain the most detailed messages. These messages may contain sensitive application data like actual received values, which is why these messages should not be enabled in a production environment. Note: Trace is translated to Verbose in the log file. |
|
Debug |
Logs that can be used to troubleshoot data flow issues by recording metrics and detailed flow-related information. |
|
Information |
Logs that track the general flow of the application. Any non-repetitive general information like the following can be useful for diagnosing potential application errors:
|
|
Warning |
Logs that highlight an abnormal or unexpected event in the application flow that does not otherwise cause the application execution to stop. Warning messages can indicate an unconfigured data source state, an insecure communication channel in use, or any other event that could require attention but that does not impact data flow. |
|
Error |
Logs that highlight when the current flow of execution is stopped due to a failure. These should indicate a failure in the current activity and not an application-wide failure. It can indicate an invalid configuration, unavailable external endpoint, internal flow error, and so on. |
|
Critical |
Logs that describe an unrecoverable application or system crash or a catastrophic failure that requires immediate attention. This can indicate application-wide failures like beta timeout expired, unable to start self-hosted endpoint, unable to access vital resource (for example, Data Protection key file), and so on. Note: Critical is translated to Fatal in the log file. |
|
None |
Logging is disabled for the given component. |
Logging parameters
|
Parameter |
Required |
Type |
Description |
|---|---|---|---|
|
logLevel |
optional |
reference |
The logLevel sets the minimum severity for messages to be included in the logs. Messages with a severity below the level set are not included. The log levels in their increasing order of severity are as follows: Trace, Debug, Information, Warning, Error, Critical, and None. Default: Information For detailed information about the log levels, see Log levels. |
|
logFileSizeLimitBytes |
optional |
integer |
The maximum size (in bytes) of log files that the service creates for the component. The value must be a positive integer. Minimum value: 1000 Maximum value: 9223372036854775807 Default: 34636833 |
|
logFileCountLimit |
optional |
integer |
The maximum number of log files that the service creates for the component. The value must be a positive integer. Minimum value: 1 Maximum value: 2147483647 Default: 31 |
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 agent component. |
|
api/v1/configuration/ComponentId/Logging |
PUT |
Updates the logging configuration of the specified agent component. |
Note: Replace ComponentId with the Id of your agent component.