Logfiles
Overview
Any business process served by the system as a whole is served by at least one logical role, and typically several of them.
During operation, roles log information to logfiles: /var/log/era/<NODE>/<CATEGORY>/<FILE>.log
, where
-
NODE
– node folder. -
CATEGORY
– folder with the name of the log category. -
FILE
– A specific log portion file of a particular type, time-bound and size-limited.
Additionally, product microservices log information to the following logs: /var/log/era/<MSVC_NODE>/domains/<MICROSERVICE_NAME>/<FILE>.log
, wherein additionally
-
MSVC_NODE
– node folder msvc. -
MICROSERVICE_NAME
– folder with the name of the product microservice.
Logs are written locally on the server in the working directory of the node where the role instance is executing.
The log files are separated by categories, so the node’s log files folder contains category folders within which the files lie.
Each file represents a specific type of logging - reflected in the prefix of its name, e.g. trn_2019-10-07.0002.log
.
Log files of the same type are divided by 10 MB and numbered with a postfix.
Log files are automatically deleted after 2 days from the closing date. If the total volume of node logs accumulated in the node log directory is more than 1 GB, the oldest files are automatically deleted. Empty category catalogs are also automatically deleted.
When the date in the local time zone of the server changes, the current files are automatically closed and logging continues in the files containing the new date in the name.
When another file is closed, it is automatically sent to the logstore (role logstore) of the current site. If not accessed, attempts to send the file will be made periodically until the file is deleted.
Logging is suspended if less than 3 GB of free space remains on the node’s working directory disk. Logging resumes when free space becomes available. The check operation runs at 1 minute intervals.
The logfile operation itself is reflected in the category logs log
.
Each log records the time and process ID of the process posting the message. When the node is restarted, the last log file will be reopened for writing and the starting set of data will be placed into it.
===================================================================== ======== Log started at 11:33:02.487 ================================ ======== Cookie='ELIVFDFOXKYQSMLOZZEN' ===================================================================== 11:33:02.487 <0.26543.6> message 1 11:33:02.530 <0.26543.6> message 2 ...
Configuring logging
According to the way the output to the logs is configured, the information is divided into:
-
Permanent - placed in logs with no possibility of shutdown.
-
Debugging is turned off in production.
-
In the master domain, in the Settings application in the System. Nodes" each node can be set to a logging level. The default is 'INFO'. The level is reset automatically on restart.
-
For debugging purposes, it can be enabled by developers and provided as an archive with the patch.
-
-
Customizable
Logging Layers
According to the method of linking to processes and entities in logs, the information is divided into:
-
infrastructural;
-
process;
-
intra-domain
-
common;
-
on entity-related processes;
-
product layer microservices.
-
It should be noted that
-
a number of domain-specific messages belong to the infrastructure layer. For example, the process of domain data synchronization between sites.
-
a number of processes, despite their connection to domains, belong to the process layer. For example, call processing and logging of SIP traffic.
Content of the categories
Category | Types and descriptions |
---|---|
|
Application logs
|
|
Role Logs
|
|
Node loading service logs
|
|
|
|
Catalog at roles logging independent intradomain processes. Contains subdirectories by domain that had messages saved to the log logs. For role |
|
Role logs
|
|
|
|
Logs of the erlang virtual machine message handler service: errors, warnings, informational messages. |
|
Role Logs
|
|
|
|
Logging service logs.
|
|
Role Logs
|
|
Role Logs
|
|
Role Logs
|
|
|
|
Role Logs
|
|
Logs of role
|
|
Role Logs
|
|
Role Logs
|
|
|
|
|
|
Logs of
|
|
|
|
SIP protocol handler role logs.
|
|
Role Logs
|
|
|
|
Log logs of the automatic file synchronization application
|
|
|
|
Role Logs
|
|
Internal process trace service logs.
|
|
|
|
Role Logs
|
|
Role Logs
|
|
|
|
Role Logs
|
In each node’s working directory, you can find some combination of the above log types depending on what roles are active in it and what processes are involved.
Special categories
There are several logs that do not fall under the described structure of storing and capturing events.
File | Description |
---|---|
|
Commits the console output of the virtual machine’s worker nodes. Placed directly in the node’s working directory.
|
|
Debug dump of a virtual machine. Its presence indicates that the node collapsed in the previous period. Created when the node process crashes. Placed directly in the node’s working directory. |
|
Registers errors that occurred in the node.
Created only by nodes executing the Placed in the root of the logging directory.
|
|
Logs crashes of internal virtual processes within a node.
Created only by nodes executing the Placed in the root of the logging directory.
|
|
Registers some key internal points in the underlying processes.
Created only by nodes executing the Placed in the root of the logging directory.
|