namespace for default logging functionality within A_UTILS_NS
More...
|
| enum | tLogLevel : uint8_t {
None = 0
, Error = 10
, Warning = 20
, Info = 30
,
Detail = 35
, Dump = 40
, Debug = Dump
, All = 0xFF
} |
| |
namespace for default logging functionality within A_UTILS_NS
◆ logger
Logger interface definition
◆ tLogLevel
◆ add_entry() [1/2]
| tVoid A_UTILS_NS::log::add_entry |
( |
const tLogEntry & | sEntry | ) |
|
Adds a new log entry to the current logger.
- Parameters
-
| [in] | sEntry | The new log entry. |
◆ add_entry() [2/2]
| tVoid A_UTILS_NS::log::add_entry |
( |
tUInt8 | nLogLevel, |
|
|
const tChar * | strMessage = nullptr, |
|
|
const tChar * | strSource = nullptr ) |
|
inline |
Adds a new log entry to the current logger. Automatically timestamps the entry.
- Parameters
-
| [in] | nLogLevel | The severity, tLogLevel. |
| [in] | strMessage | The message text (optional) |
| [in] | strSource | A string describing the source location (optional). |
◆ default_logger()
| tVoid A_UTILS_NS::log::default_logger |
( |
const tLogEntry & | sEntry | ) |
|
Default logging method, that writes log messages to stdout.
- Parameters
-
◆ get_current_log_channel()
| ILogChannel * A_UTILS_NS::log::get_current_log_channel |
( |
| ) |
|
|
noexcept |
- Returns
- The default log channel for the current thread and stack.
- Warning
- This can only be manipulated via the use of cCurrentThreadDefaultLogChannel in the call stack. Defaults to a generic default log channel per module (shared library) if no other channel is set for the current thread and stack, see set_fallback_log_channel().
◆ get_logger()
| logger A_UTILS_NS::log::get_logger |
( |
| ) |
|
Returns the currently used logger.
- Returns
- The currently used logger.
◆ log_get_current_date_time()
| tTimeStamp A_UTILS_NS::log::log_get_current_date_time |
( |
| ) |
|
Internal helper to hide cDateTime::GetCurrentDateTime
◆ set_filtered_logging()
| tVoid A_UTILS_NS::log::set_filtered_logging |
( |
tUInt8 | nMaxLogLevel, |
|
|
logger | oLogger = default_logger ) |
|
inline |
Convenience method to filter log messages.
- Parameters
-
| [in] | nMaxLogLevel | The maximum log level. |
| [in] | oLogger | The logger that will be used. |
◆ set_logger()
| tVoid A_UTILS_NS::log::set_logger |
( |
logger | oLogger | ) |
|
Sets the currently used logger.
- Parameters
-
| [in] | oLogger | The new logger method. |
◆ set_module_fallback_log_channel()
| void A_UTILS_NS::log::set_module_fallback_log_channel |
( |
ILogChannel * | pChannel | ) |
|
|
noexcept |
Sets the log channel that is used if no other channel has been pushed onto the stack.
- Parameters
-
| [in] | pChannel | The channel to use as a fallback. |
◆ set_module_log_channel_stack()
Sets the log channel stack that is used by the current module
- Parameters
-
| [in] | pStack | The stack to use (nullptr -> back to default) |