System Logs

 

Both M5 Control Panel and M5 Monitor Service output system logs to indicate normal operations and provide contextual information related to system failures. These log files are stored in the log folder created when the software was installed.

Windows: C:\ProgramData\PTAGIS\M5\Log

Linux: /usr/share/PTAGIS/M5.

 

A new log file is automatically created each day with a unique file name such as M5MonitorLog-20220429.txt created by M5 Monitor Service on 04/29/2022. The log files are simple text files that include information about startup, file submission, connection metadata and other operations. When an error occurs, an alert is generated but the error is also written to the log file. It can be useful to review the log file to diagnose the cause of persistent and/or reproducible errors in context with other logged events occurring before and after the error.

 

The verbosity of M5 logging is controlled via configuration with a setting called MinimumLevel with a Level value described below. For example, MinimulLevel=Information will only log events identified as Information, Warning, Error, or Fatal only; it will not log any events identified as Debug or Verbose.

Level

Usage

Verbose

Verbose is the noisiest level, primarily used when testing new features. Rarely, if ever, enabled for a production application.

Debug

Debug is used for internal system events that are not necessarily observable from the outside, but useful when determining how something happened.

Information

Information events describe things happening in the system that correspond to its responsibilities and functions. Generally, these are observable actions the system can perform.

Warning

When service is degraded, endangered, or may be behaving outside of its expected parameters, Warning level events are used.

Error

When functionality is unavailable or expectations broken, Error level events are used.

Fatal

The most critical level, Fatal events demand immediate attention and are related to Critical Alerts.

 

By default, M5 Control Panel and M5 Monitor Service have their logging set with a MinimumLevel of Information. It may be desirable to change this configuration setting to get more or less log file detail.

To change the log level:

1.An account with elevated privileges is required to modify this configuration

2.From installation folder on the target machine, copy the appsettings.json file to a temporary folder

a.For M5 Control Panel, the installation folder is C:\Program Files\PTAGIS\M5 Control Panel

b.For M5 Monitor Service on Windows, the installation folder is C:\Program Files\PTAGIS\M5 Monitor Service

c.For M5 Monitor Service on Linux, the installation folder is /opt/ptagis/m5

3.Open the appsettings.json file in the temporary folder for editing and update the Default setting value below with a new logging level from Table 1:

"Serilog": {

"MinimumLevel": {

"Default": "Debug"

},

4.Save the changes and copy the file back to the installation folder, overwriting original

5.Restart the Windows service or systemd service for the new setting to take effect

 

NOTE: it is not recommended to use Debug or Verbose logging level for a long period of time as the amount of detail can make it cumbersome to manage and can unnecessarily fill up a small hard drive.