DCSModulesAPI
1.0.0
DCS sub project containing all the control modules as libraries.
|
This class enables writing to a single (or multiple) buffer(s) for logging. Thread-safe. More...
#include <DCS_ModuleUtils.h>
Public Types | |
enum | Verbosity { Verbosity::CRITICAL, Verbosity::ERROR, Verbosity::WARNING, Verbosity::MESSAGE, Verbosity::DEBUG } |
Contains the possible verbosity levels for the Logger. More... | |
enum | Options { Options::ENABLE_COLOR, Options::DISABLE_COLOR } |
Contains the possible Logger custom options. More... | |
Static Public Member Functions | |
static DCS_API void | Init (Verbosity level, DCS::Utils::String file="default_log.log") |
Initialize the Logger system. Call only once. | |
static DCS_API void | Destroy () |
Destroy the Logger system. Call only once. | |
static DCS_API void | SetLogWriteCallback (WriteNotifyCallback wnc, void *obj=nullptr) |
Sets the callback to be called when a log is made. Then sends the text to the client. | |
static DCS_API void | Debug (const char *file, const char *msg,...) |
Emit a debug message. More... | |
static DCS_API void | Message (const char *file, const char *msg,...) |
Emit a status message. More... | |
static DCS_API void | Warning (const char *file, const char *msg,...) |
Emit a warning message. More... | |
static DCS_API void | Error (const char *file, const char *msg,...) |
Emit an error message. More... | |
static DCS_API void | Critical (const char *file, const char *msg,...) |
Emit a critical error message. More... | |
static DCS_API void | Settings (Options opt) |
Changes Logger Options. | |
static DCS_API void | ChangeVerbosity (Verbosity v) |
Changes the verbosity level. | |
This class enables writing to a single (or multiple) buffer(s) for logging. Thread-safe.
|
strong |
Contains the possible Logger custom options.
Enumerator | |
---|---|
ENABLE_COLOR |
Enables console output with colors. |
DISABLE_COLOR |
Disables console output with colors. |
|
strong |
Contains the possible verbosity levels for the Logger.
Passing a value to Logger::Init will prevent lower priority messages from being displayed in the console. The file output (Logger::handle) is not affected by this, printing every event.
|
static |
Emit a critical error message.
Uses printf like formating.
|
static |
Emit a debug message.
Uses printf like formating.
|
static |
Emit an error message.
Uses printf like formating.
|
static |
Emit a status message.
Uses printf like formating.
|
static |
Emit a warning message.
Uses printf like formating.