Logging System of Diarkis Module
・
Last updated
・
Last updated
This page explains the logging system of the Diarkis Module.
In the Diarkis Module, logs are output for the Diarkis runtime library and the operation status of the Diarkis Module. The output logs can be viewed using various methods such as standard output or file output. If you are experiencing unexpected behavior or want to check the status of Diarkis runtime, we recommend reviewing the log files as the first step.
The logging system configuration for the Diarkis Module is controlled by the arguments passed to DiarkisInterfaceBase::DiarkisInit()
. You can configure options such as log directory name, output method, and whether to produce logs.
The Diarkis Module supports the following output methods:
Enum | Description |
---|---|
In the logging system of the Diarkis Module, you can set log output levels to adjust the detail of the log contents. The default log output level is specified in the constructor of LoggerFactory
implemented in diarkis-module\Client\Private\logging\LoggerFactory.cpp
. This can be changed to modify the level of detail. Additionally, you can dynamically adjust it during app execution using LoggerFactory::SetSeverity()
.
The log output levels are as follows. The settings further down the list provide more detailed logs. Furthermore, higher detail log levels always encompass lower log levels. Please be careful when using Verbose or Trace, as they may affect the runtime speed of Diarkis or cause log files to become large.
The logging system of the client library provides a mechanism to change log levels by category. Adjust the log levels of the necessary categories according to the content you wish to check during debugging.
Using a custom logger allows the user to freely customize the logger's operations. By inheriting from ILoggerBackend
and overriding ILoggerBackend::Log()
, you can handle the log output processing of the Diarkis runtime and Diarkis Module. Below is a sample implementation.
Enum | Description |
---|---|
Representative Category | Content Verifiable During Debugging |
---|---|
DEBUG_OUT
Logs are output to the debugger if possible; otherwise, they are sent to standard output.
FILE_OUT
Logs are output to a file. The file is named diarkis-log.log
in the path obtained by GetLogDirectoryPath()
.
FILE_OUT_SPECIFIC_PATH
Logs are output to a specified path.
CONSOLE_OUT
Logs are output to standard output.
DEBUG_AND_FILE_OUT
Combines the behaviors of DEBUG_OUT and FILE_OUT.
CUSTOM
Logs are output to a user-defined custom logger.
None
Do not output logs.
Fatal
Output logs for critical errors.
Error
Output logs including general errors.
Warning
Output logs including warnings.
Info
Output logs with additional information.
Debug
Output logs including debugging information.
Verbose
Output logs with detailed debugging information.
Trace
Output detailed logs of runtime operations and transmitted/received payloads.
UDP
Verification of Connect, Disconnect with the UDP server. Unexpected disconnections and ack, eack during packet loss.
RUDP
Verification of RUDP packets and sequence number processing during packet loss.
Socket
Verification of socket operations when unexpected disconnections occur.
P2P
Issues around hole punching and packet communication during P2P communications.
Runtime
Verification when implementing applications and there are no notifications or responses from the server during packet sending/receiving.
Categories for Each Module like Room
Verification during implementation of each module when there are no notifications or responses from the server during packet sending/receiving.