|
Safeheron-SGX-Native-Development-Framework v1.2.0
|
Singleton class for managing logging within the SGX library. More...
#include <ssgx_log_t_logger.h>
Public Member Functions | |
| void | SetTraceId (const std::string &trace_id) |
| Sets a trace ID for log messages. | |
| SSGXLogger (const SSGXLogger &)=delete | |
| SSGXLogger & | operator= (const SSGXLogger &)=delete |
Static Public Member Functions | |
| static SSGXLogger & | GetInstance () |
| Retrieves the singleton instance of SSGXLogger. | |
Singleton class for managing logging within the SGX library.
This class provides a centralized logging interface for the SGX library. It supports log level configuration, trace ID management, and the ability to initialize a logger with file and console appenders.
Usage:
|
delete |
|
static |
Retrieves the singleton instance of SSGXLogger.
This method provides thread-safe access to the single instance of the logger.
|
delete |
| void ssgx::log_t::SSGXLogger::SetTraceId | ( | const std::string & | trace_id | ) |
Sets a trace ID for log messages.
The trace ID is stored in the logging context and can be used to correlate log messages across different parts of the application. To include the trace ID in log messages, the log pattern must contain X{TraceId}.
Example:
| trace_id | The trace ID string to be included in subsequent log messages. |