ProKnow DICOM Agent: Configuring Log Retention

Rolling Log File Configuration

ProKnow DICOM Agent utilizes the Serilog .NET logging library along with its Serilog.Sinks.File package to provide rolling log file functionality. This feature causes the logging to automatically roll to a new log file based on configured time and/or log file size. It also allows configuration of the maximum number of log files. Together, this configuration can prevent runaway disk usage.

The rolling log file configuration can only be modified while ProKnow DICOM Agent is not executing. Use the Services tab within Task Manager to stop ProKnowDICOMAgentService prior to editing the configuration. The configuration is in the appsettings.json file located in the application installation folder (typically C:\Program Files\Elekta\ProKnow DICOM Agent). Make a backup of this file prior to attempting to edit it. Use a text editor such as Notepad to edit this file, making sure to preserve the JSON format.

Attempting to edit any other settings other than those specified below may cause ProKnow DICOM Agent to stop working.

The configurable log retention settings are:

  • rollingInterval – Specifies the frequency at which the log file should roll. Set to "Day" by default, resulting in a new log file every day. Allowable values are "Infinite" (never rolls), "Year", "Month", and "Day".
  • fileSizeLimitBytes – Specifies the file size threshold. Once reached, no further log messages will be written until the next roll point (see the rollOnFileSizeLimit setting). Set to 1048576 bytes (1 MB) by default. If this setting is removed, the file size is limited to 1 GB. If this setting is set to null, there is no file size limit (not recommended).
  • retainedFileCountLimit – Specifies the number of log files retained. Once this limit is reached, older log files will be deleted. Set to 365 by default. Removing this setting limits the number of logs files to 31. If this setting is set to null, there is no limit to the number of log files (not recommended).
  • rollOnFileSizeLimit – Specifies whether to roll to a new log file when the fileSizeLimitBytes setting is reached. Set to true by default. Allowable values are true and false.

Backup of Log Files

The "Path" setting in the appsettings.json file indicates the folder in which the log files are written. The format of the log filename is app-YYYYMMDD.log. If logging rolls over to additional log files during the day, the new log files will be named app-YYYYMMDD_001.log, YYYYMMDD_002.log, etc.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.