S2OPC OPCUA Toolkit
|
Specialized logger for the Toolkit. More...
Go to the source code of this file.
Macros | |
#define | ATTR_FORMAT(archetype, string_index, first) |
#define | LOGGER_FUNC_FORMAT_ENUM ATTR_FORMAT(printf, 2, 3) |
#define | LOGGER_FUNC_FORMAT ATTR_FORMAT(printf, 1, 2) |
Typedefs | |
typedef enum SOPC_Log_Module | SOPC_Log_Module |
enumerate to define log modules | |
Enumerations | |
enum | SOPC_Log_Module { SOPC_LOG_MODULE_COMMON , SOPC_LOG_MODULE_CLIENTSERVER , SOPC_LOG_MODULE_PUBSUB } |
enumerate to define log modules More... | |
Functions | |
bool | SOPC_Logger_Initialize (const SOPC_Log_Configuration *const logConfiguration) |
Initializes the logger system. | |
SOPC_Log_Instance * | SOPC_Logger_AddUserInstance (const char *category) |
Add a user instance in the existing Toolkit log. The new created instance is managed by SOPC_Logger and does not need to be deleted by caller. | |
void | SOPC_Logger_SetTraceLogLevel (SOPC_Log_Level level) |
Defines the active log level for the given log instance (default: ERROR): | |
SOPC_Log_Level | SOPC_Logger_GetTraceLogLevel (void) |
getter for the log level | |
void | SOPC_Logger_SetConsoleOutput (bool activate) |
Activates the console output for logged traces (same active level as log file) | |
void | SOPC_Logger_TraceError (SOPC_Log_Module logModule, const char *format,...) LOGGER_FUNC_FORMAT_ENUM |
Log a trace with the error level. | |
void | SOPC_Logger_TraceWarning (SOPC_Log_Module logModule, const char *format,...) LOGGER_FUNC_FORMAT_ENUM |
Log a trace with the warning level. | |
void | SOPC_Logger_TraceInfo (SOPC_Log_Module logModule, const char *format,...) LOGGER_FUNC_FORMAT_ENUM |
Log a trace with the info level. | |
void | SOPC_Logger_TraceDebug (SOPC_Log_Module logModule, const char *format,...) LOGGER_FUNC_FORMAT_ENUM |
void | SOPC_Logger_TraceSecurityAudit (const char *format,...) LOGGER_FUNC_FORMAT |
Log a trace for the security audit log. | |
void | SOPC_Logger_TraceSecurityAuditWarning (const char *format,...) LOGGER_FUNC_FORMAT |
Log a warning trace for the security audit log. | |
void | SOPC_Logger_TraceOpcUaAudit (const char *format,...) LOGGER_FUNC_FORMAT |
Log a trace for the OPC UA audit log. | |
void | SOPC_Logger_TraceOpcUaAuditWarning (const char *format,...) LOGGER_FUNC_FORMAT |
Log a warning trace for the OPC UA audit log. | |
void | SOPC_Logger_Clear (void) |
Clears the logger and close the current log files. | |
Specialized logger for the Toolkit.
#define ATTR_FORMAT | ( | archetype, | |
string_index, | |||
first ) |
#define LOGGER_FUNC_FORMAT_ENUM ATTR_FORMAT(printf, 2, 3) |
#define LOGGER_FUNC_FORMAT ATTR_FORMAT(printf, 1, 2) |
typedef enum SOPC_Log_Module SOPC_Log_Module |
enumerate to define log modules
enum SOPC_Log_Module |
bool SOPC_Logger_Initialize | ( | const SOPC_Log_Configuration *const | logConfiguration | ) |
Initializes the logger system.
logConfiguration | Global log configuration |
SOPC_Log_Instance * SOPC_Logger_AddUserInstance | ( | const char * | category | ) |
Add a user instance in the existing Toolkit log. The new created instance is managed by SOPC_Logger and does not need to be deleted by caller.
category | The new user category name. |
void SOPC_Logger_SetTraceLogLevel | ( | SOPC_Log_Level | level | ) |
Defines the active log level for the given log instance (default: ERROR):
level | The level to be activated for the log instance |
SOPC_Log_Level SOPC_Logger_GetTraceLogLevel | ( | void | ) |
getter for the log level
void SOPC_Logger_SetConsoleOutput | ( | bool | activate | ) |
Activates the console output for logged traces (same active level as log file)
activate | Flag to activate / deactivate the console output |
void SOPC_Logger_TraceError | ( | SOPC_Log_Module | logModule, |
const char * | format, | ||
... ) |
Log a trace with the error level.
logModule | The log module |
format | String specifying how subsequent arguments are converted for output |
void SOPC_Logger_TraceWarning | ( | SOPC_Log_Module | logModule, |
const char * | format, | ||
... ) |
Log a trace with the warning level.
logModule | The log module |
format | String specifying how subsequent arguments are converted for output |
void SOPC_Logger_TraceInfo | ( | SOPC_Log_Module | logModule, |
const char * | format, | ||
... ) |
Log a trace with the info level.
logModule | The log module |
format | String specifying how subsequent arguments are converted for output |
void SOPC_Logger_TraceDebug | ( | SOPC_Log_Module | logModule, |
const char * | format, | ||
... ) |
void SOPC_Logger_TraceSecurityAudit | ( | const char * | format, |
... ) |
Log a trace for the security audit log.
format | String specifying how subsequent arguments are converted for output |
void SOPC_Logger_TraceSecurityAuditWarning | ( | const char * | format, |
... ) |
Log a warning trace for the security audit log.
format | String specifying how subsequent arguments are converted for output |
void SOPC_Logger_TraceOpcUaAudit | ( | const char * | format, |
... ) |
Log a trace for the OPC UA audit log.
format | String specifying how subsequent arguments are converted for output |
void SOPC_Logger_TraceOpcUaAuditWarning | ( | const char * | format, |
... ) |
Log a warning trace for the OPC UA audit log.
format | String specifying how subsequent arguments are converted for output |
void SOPC_Logger_Clear | ( | void | ) |
Clears the logger and close the current log files.