Log files
Overview
Any business process served by the system as a whole is served by at least one logical role, and usually by several of them.
During operation, roles write information to log files: /var/log/era/<NODE>/<CATEGORY>/<FILE>.log, where
-
NODE– folder with the node name. -
CATEGORY– folder with the log category name. -
FILE– specific file of a log portion of a certain type, bound to time and limited in size.
Additionally, product microservices write information to log files: /var/log/era/<MSVC_NODE>/domains/<DOMAIN_NAME>/<MICROSERVICE_NAME>/<FILE>.log, where additionally
-
MSVC_NODE– folder with the msvc node name. -
DOMAIN_NAME– folder with the domain name (domain entity). -
MICROSERVICE_NAME– folder with the product microservice name.
Log files are written locally on the server in the node working directory where the role instance runs.
Log files are divided by categories, so the node log folder contains category folders with files inside.
Each file represents a certain logging type – reflected in its name prefix, for example trn_2019-10-07.0002.log.
Log files of one type are split at 10 MB and numbered with a postfix.
Log files are deleted automatically 2 days after closing. When the total volume in the node log directory exceeds 1 GB, the oldest files are deleted automatically. Empty category directories are also deleted automatically.
When the date changes in the server local time zone, current files are closed automatically and logging continues in files containing the new date in their name.
When the next file closes, it is automatically sent to the log storage (the logstore role) of the current site. If it is inaccessible, attempts to send the file are made periodically until the file is deleted.
Logging is suspended if less than 3 GB of free space remains on the disk with the node working directory. Logging resumes after free space appears. The check operation runs every 1 minute.
Working with log files is itself reflected in log files of the log category.
Each log file records the time and identifier of the process placing the message. When the node restarts, the last log file is reopened for writing and the initial data set is placed into it.
================================================================================ ======== Log started at 2024-09-05 11:33:02.487 ================================ ======== Cookie='ELIVFDFOXKYQSMLOZZEN' ================================================================================ 11:33:02.487 <0.26543.6> message 1 11:33:02.530 <0.26543.6> message 2 ...
Logging configuration
By the method of configuring output to log files, information is divided into:
-
Permanent – placed in log files without the ability to disable.
-
Debug – disabled in production.
-
In the master domain, in the "Settings" application under "System. Nodes", a logging level can be set for each node. Default 'INFO'. The level is reset automatically on restart.
-
For debugging purposes it can be enabled by developers and provided as an archive with a patch.
-
-
Configurable
Logging layers
By the method of binding to processes and entities, information in log files is divided into:
-
infrastructure;
-
process;
-
intra-domain
-
general;
-
by processes related to entities;
-
product layer microservices.
-
It should be noted that
-
a number of domain messages belong to the infrastructure layer. For example, the domain data synchronization process between sites.
-
a number of processes, despite their connection to domains, belong to the process layer. For example, call processing and SIP traffic logging.
Category contents
| Category | Types and descriptions |
|---|---|
|
Log files of the
|
|
Log files of the
|
|
Log files of the
|
|
Log files of the node loading service
|
|
Log files of the
|
|
Log files of the
|
|
|
|
Directory for roles logging independent intra-domain processes. Contains subdirectories by domains in which messages saved to log files existed. For the |
|
Log files of the
|
|
Log files of the
|
|
|
|
Log files of the erlang virtual machine message handler service: errors, warnings, information messages. |
|
Log files of the
|
|
Log files of the
|
|
|
|
Log files of the
|
|
Log files of the logging service.
|
|
Log files of the
|
|
Log files of the
|
|
Log files of the
|
|
Log files of the
|
|
Log files of the
|
|
|
|
Log files of the
|
|
Log files of the
|
|
Log files of the
|
|
Log files of the
|
|
Log files of the
|
|
Log files of the
|
|
|
|
|
|
Log files of the
|
|
|
|
Log files of SIP protocol handler roles.
|
|
Log files of the
|
|
|
|
Log files of the
|
|
Log files of the
|
|
Log files of the
|
|
Log files of the internal process tracing service.
|
|
|
|
Log files of the
|
|
Log files of the
|
|
|
|
Log files of the
|
In the working directory of each node, a certain set of the log types above can be found depending on which roles operate in it and which processes they participate in.
Special categories
There are several log files that do not fit the described storage and event recording structure.
| File | Description |
|---|---|
|
Records console output of erlang virtual machine worker nodes. Placed directly in the node working directory.
|
|
Debug dump of the virtual machine. Its presence indicates that the node crashed in the previous period. Created when the node process crashes. Placed directly in the node working directory. |