# On-prem Agent logs
The on-prem agent (OPA) logs a variety of events. The log file contains OPA activity, warnings, and traces. The most common use of log files is for troubleshooting, but there are other scenarios, such as audit and compliance.
# Logging schedule
The OPA logger creates a new log file at the start of each day, based to the on-premise system time. It also creates a new log file after the file size exceeds 20 MB. To identify the multiple log files of the same day, the system numbers them sequentially.
You can access the OPA log files in the agent folder. The OPA retains only the most recent 60 files, or at most 20 GB of files.
# Scenario 1: logging up to 20 MB
- Date
- 01-NOV-2019
- Total file size:
- 15 MB
- Log file
/agent-2019-11-01.0.log
A log file starts at the beginning of the day.
# Scenario 2; logging over 20 MB
- Date
- 02-NOV-2019
- Total file size
- 25 MB
- Log file
/agent-2019-11-02.0.log
A log file is starts at the beginning of the day. The system stores the first 20 MB in this file./agent-2019-11-02.1.log
A new log file starts when the system reaches the limit of 20 MB. It contains the remaining 5 MB.
# OPA log properties
OPA logs contain the following properties:
- Date
- OPA dates each log file to improve its findability.
- Numbered logs
- If there are multiple log files on the same day, OPA numbers them sequentially.
- File size limit
- The logger enforces a 20 MB size limit to make it easier to query file content.
- Storage limit
- The folder limit reduces the storage load on the server.
# Logging OPA activity
At the top level of your config.yml
file, add the logging
definition to record the various level of activity logs.
logging:
cloud: true
logger: logging_level
workato: debug
sql: trace
OPA uses the cloud
property to send the logs to Workato cloud, to the Workato support team can efficiently access these logs when you require assistance in solving technical issues. This option is enabled by default in the config file. If you don't want to send your agent logs and performance data to Workato, set this value to false
.
# Workato loggers
These are the loggers that Workato uses:
- workato
- This will include logs from all parts of the OPA.
- sql
- This will only log database-related parts of the OPA.
- custom
- See Using a custom logger for more information.
# Workato logging levels
These are the supported logging levels:
- trace
- Information for identifying steps that lead to the error. Typically used for diagnosis in the engineering support group.
We recommend that you use this *temporarily*, because this exposes a large amount debugging information, including *confidential data*.
Example: Starting secure tunnel - debug
- Information for troubleshooting or diagnosis, and readable/understandable by users.
Example: Failure due to an unknown exception. - info
- Information logged under normal conditions.
Example: agent starting or stopping. - warn
- Information about a potential problem that does not require immediate attention from the user.
Example: transient network interruption. - error
- Information about an error that needs investigation.
Example: Agent failed to start.
# Logging for specific profiles
You can also choose to selectively enable logs for specific profiles. All you have to do is add the debug: true
definition to the profile:
database:
sql:
adapter: mysql
database: workato
username: user
password: password
timeout: 30
debug: true
# Using a custom logger
You can also use a custom logger instead of the native Workato loggers. Simply replace the logger name with the name of the class or the package of your custom logger.
logging:
"com.workato.agent.file": debug
Last updated: 6/5/2023, 12:50:21 PM