Skip to main content
Skip table of contents

Logging

All logs related to DATPROF Runtime are saved in the DATPROF Runtime Data folders. The logging system consists of two main components, both of which are configurable:

  1. Runtime Service Logging:
    This logs events related to the Runtime Application itself, including application start-up, shut-down, errors, and other critical events.

  2. Agent Service Logging:
    This logs events related to the Runtime agents, including agent activity, tasks performed by agents, and any issues that arise during agent execution.

Both logging components are fully configurable, allowing users to adjust the level of logging and where the logs are stored, based on their specific requirements.

Runtime Service Logging

The Runtime Service Logging is stored in the <RuntimeDataFolder>\logs directory. This folder contains several log files that capture different aspects of the Runtime service's activity:

  • runtime-service.log:
    This is the current log file that contains real-time logs of the Runtime service's operations.

  • runtime-service-<yyyy-mm-dd>.<Sequence>.log:
    These are history log files, which archive logs based on date and sequence.

  • runtime-port.txt:
    This file contains the current port number used by the Runtime service. It is also used to stop the Runtime service.

  • runtime-pid.txt:
    This file contains the current process ID (PID) of the Runtime service. It is used to stop the Runtime service.

The number and size of the service logs can be configured by editing the logback.xml file located in <RuntimeDataFolder>\conf. This allows users to adjust logging settings according to their needs, such as controlling log file retention and maximum file size.

Agent Service Logging

The Agent Logging is stored in the <RuntimeDataFolder>\agents\<AgentNr>\logs directory, with each agent having its own set of log files. These log files capture the activities and events specific to the individual agents.

The folder contains the following log files:

  • Runtime-agent.log:
    This is the current log file for the specific agent, recording real-time activities and errors.

  • Runtime-agent-<yyyy-mm-dd>.<Sequence>.log:
    These are historical log files for the agent, archived by date and sequence number for easier tracking of past events.

The number and size of the agent logs are configurable by editing the logback.xml file located in <RuntimeDataFolder>\agents\<AgentId>\conf. This allows users to control log file retention, size, and other logging behaviors for each agent.

Configuring logfiles

DATPROF Runtime uses Logback for its logging system, and both the Runtime service and Runtime agents use the same configuration file format: logback.xml. This provides flexibility in configuring the logging system to meet specific needs.

Two important settings in the logback.xml file that can be adjusted are:

  • <maxFileSize>50MB</maxFileSize>:
    This specifies the maximum size of a log file. Once the log file reaches 50MB, a new log file will be created automatically.

  • <maxHistory>5</maxHistory>:
    This defines the maximum number of log files to keep. In this example, a maximum of 5 log files will be retained. Older log files will be deleted once this limit is reached.

Runtime Audit Logging

As of Runtime version 4.11.0, enhanced audit logging functionality has been added to provide comprehensive tracking of runtime activities, including actions such as adding a license key, signing in, or identifying who has started which run. This feature is implemented using Logback, a successor to the popular log4j project, specifically leveraging its Time-Based Rolling Policy for log file management.

Audit logs are managed through the logback-service.xml configuration file. The relevant configuration is as follows:

CODE
<appender name="AuditTrailLogFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${service-logs-dir}/audittrail/runtime-audit-trail.jsonl</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <fileNamePattern>${service-logs-dir}/audittrail/runtime-audit-trail-%d{yyyy-ww}.jsonl</fileNamePattern>
        <maxHistory>52</maxHistory>
    </rollingPolicy>
</appender>

Audit logs are stored in the directory specified by ${service-logs-dir line, and the log files are named runtime-audit-trail.jsonl. Logs are rotated based on time intervals defined by the fileNamePattern attribute. By default, logs are organized weekly, as indicated by runtime-audit-trail-%d{yyyy-ww}.jsonl. The maxHistory parameter determines how many historical log files are retained, with the default retention period being 52 weeks (one year).

The retention period for logs can be modified by adjusting the maxHistory parameter. For example, to retain logs for 26 weeks, update the configuration as follows:

CODE
<maxHistory>26</maxHistory>

The time interval for log rotation can be changed by modifying the fileNamePattern parameter. For monthly rotation, use runtime-audit-trail-%d{yyyy-mm}.jsonl. For daily rotation, use runtime-audit-trail-%d{yyyy-mm-dd}.jsonl. To configure daily log rotation, update the fileNamePattern as shown below:

CODE
<fileNamePattern>${service-logs-dir}/audittrail/runtime-audit-trail-%d{yyyy-mm-dd}.jsonl</fileNamePattern>

DATPROF Runtime as a Windows service

When DATPROF Runtime is running as a Windows service, additional log files related to the Windows Service Wrapper (winsw) will be created inside the \winsw folder. These logs provide detailed information about the service's operations:

  • DatprofRuntimeService.out.log:
    Contains all the standard output that would normally appear in the command line during startup.

  • DatprofRuntimeService.err.log:
    Contains all error-related output from the service.

  • DatprofRuntimeService.wrapper.log:
    Logs the activities of the Windows Service Wrapper itself, which is responsible for managing the service's lifecycle.

By adjusting the logback.xml settings, administrators can ensure that logging behavior aligns with operational and storage requirements while maintaining full visibility into both the runtime service and agent activities.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.