Log
- 1 Summary
- 2 Log View
- 3 Configuration
- 4 Output Format
- 4.1 Details By Item
- 4.2 Log Level
- 5 Log List
- 5.1 Main
- 5.2 Config
- 5.3 packet_process_pool
- 5.4 Resource-specific logger
- 5.4.1 Details by tag
- 5.4.2 Log List
- 5.5 IPC
- 5.6 crash_handler
Summary
The DRX logs output the same logs to the following two paths.
Standard output
Log file
When operating in service mode, the standard output is not used.
The file output is distributed to the main and resource logs.
File | Path | Content |
|---|---|---|
main log file | {DRX installed path}/logs/main.log | DRX operation. Exclude actions by resources |
resource-specific log file | {DRX installed path}/logs/{resource_name}/{resource_name}.log | Behavior of resources |
When each file reaches the set size, the file is archived and a new one is created.
The file being archived is appended with the date and time at that point in time. (ex: main_2018-11-22_1432.log)
Log View
The following types of commands are provided to output the active DRX log in real time.
drx-ctl log {options} [resource or all]
Supported options:
Option | Shortcut | Description |
|---|---|---|
--include-main | -m | Print the main log. If this option is not specified, only resource-specific logs are output. |
--lines {num} | -n {num} | Output the last num lines. |
When you execute this command, you can continuously output the update of the log file and terminate it with Ctrl-C.
Configuration
The log-related items that can be set in the configuration file (drx.conf) are as follows.
Item | Value | Format | Description |
|---|---|---|---|
loglevel-stdout | Log level | trace, debug, info, warning, error, critical, off | Specifies the level of the standard output log. |
loglevel-file | Log level | trace, debug, info, warning, error, critical, off | Specifies the level of the log output to the file. |
logfile-max-size | File size | Bytes (ex: 10MB) | When the log file reaches the specified capacity, the current log file is archived and a new one is created. |
logfile-max-count | File count | Number | Maximum number of current and archived log files. |
The log level can be changed in real time via drx-ctl.
drx-ctl set console-loglevel [level]
drx-ctl set file-loglevel [level]
However, the standard output level is ignored when running in service mode.
Output Format
level/data time thread logger:tag] message
Details By Item
Item | Format | Example | Description |
|---|---|---|---|
log level/date | {level}{date} | I1004 | Print log level and date without spaces. |
time | hour:min:sec.microsec | 16:44:13.790530 | - |
thread | t{thread ID} | t3056 | The thread ID that generated the log. |
logger | logger name | main | Logger name for dividing log category. |
tag | tag name | license | Represents a subrange of the logger, or represents the details of the channel. |
Log Level
Abbreviation | Level | Range |
|---|---|---|
T | trace | Very detailed operation log |
D | debug | Used when problems arise that require debugging |
I | info | General information such as state change or behavior |
W | warning | A situation where an unintended problem occurs, but there is no problem in resuming or continuing the operation |
E | error | A situation where an unintended problem occurs and the action can not be continued |
C | critical | Serious error that can not keep the program running |
Log List
This document describes only from info level to critical level.
Main
Tag | Level | Format | Example | Description | Source file |
|---|---|---|---|---|---|
| info | Compiled at {date} {time} | Oct 4 2018 09:04:38 | When DRX was compiled. | drx.cpp |
info | System Locale: {locale} | en_US.windows-1252 | Current system locale value. | drx.cpp | |
info | DRX path: {path} | C:\Program Files\DRX | Path where DRX is installed. | drx.cpp | |
info | EXE path: {path} | C:\Program Files\DRX\bin | The path where the currently executed DRX is located. | drx.cpp | |
info | Starting in foreground mode | - | Read all the settings and the program has been initialized. | drx.cpp | |
info | Starting in daemonize mode | - | Read all the settings and the program has been initialized. | drx.cpp | |
error | Initialization failed | - | Failed to read preferences. | drx.cpp | |
warning | Environment variable 'DRX_PATH' is not exists | - | - | instance.cpp | |
info | Closing drx | - | The last log in the process of terminating the DRX. | core.cpp | |
error | System error at quit. ({error_id}: {message}) | - | System error during DRX shutdown | core.cpp | |
info | Read resources configuration success | - | Read resource-specific settings from DRBD configuration. | core.cpp | |
warning | Read resources configuration failed | - | It can also happen if there is no resource. | core.cpp | |
info | License is available | - | - | core.cpp | |
error | License is not available | - | Exit the program after this log. | core.cpp | |
info | Resource create complete | - | All the configured resources have been created. IPC services are available. | core.cpp | |
info | Create resource [name] | - | - | drx_manager.cpp | |
error | Resource name [name] is already exists |
| The resource settings are invalid or you tried to add a resource that already exists. | drx_manager.cpp | |
error | Failed to create resource [name]. {message} |
| An error occurred during resource creation. Exit the program after this log. | drx_manager.cpp | |
info | Resource [name] deleted |
| You have deleted resources through IPC. | drx_manager.cpp | |
info | IPC service started | - | An IPC server is created. | drx_manager.cpp | |
error | Failed to start IPC service | - | There is little chance of occurrence other than memory shortage. | drx_manager.cpp | |
error | System error while stopping. ({error_id}: {message}) |
| An error occurred during program termination. | drx_manager.cpp | |
license | info | Verify license is available | - | The license verification process begins. | drx_manager.cpp |
info | License applied | - | Output when the license is applied with 'set license' command. | drx_manager.cpp | |
error | Failed to get drx path | - | The environment variable 'DRX_PATH' may not exist. | drx_manager.cpp | |
info | Checking license for [file_path] | C:\Program Files\DRX\drx.lic | Check the license file for that path. | drx_manager.cpp | |
error | Failed to initializing license system. {message} |
| Failed to read the license. The error is the output from RLM. | drx_manager.cpp | |
error | License file not found at [file_path] |
| The file does not exist in the specified path. Output when using 'set license' command. | drx_manager.cpp | |
error | Invalid License {product_name}({message}) | drx(-40) | Your license is invalid or has expired. The error number is from the RLM. | drx_manager.cpp | |
error | License Expired {product_name} | drx | The period has expired and can not be used. The license must be replaced. | drx_manager.cpp | |
info | License Status: {value} | Permanent |
| drx_manager.cpp | |
plugins | info | All plugin loaded |
|
| plugin_manager.cpp |
critical | Failed to load crypto {name}. {message} |
| Exit the program after this log. | plugin_manager.cpp | |
info | Crypto plugins loaded: {names} | OPENSSL | Completed loading of encryption plugins. | plugin_manager.cpp | |
critical | Failed to load compressor {name}. {message} |
| Exit the program after this log. | plugin_manager.cpp | |
info | Compressor plugins loaded: {names} | ZLIB, LZ4 | Completion of loading of compression plugins. | plugin_manager.cpp | |
resource | info | Loading language: [file_path] | C:\Program Files\DRX\lang\english.ini | 'lang' entry in drx.conf | lang.cpp |
warning | Language file [file_path] not found |