Logger of a specific context.
More...
#include <logger.h>
Logger of a specific context.
◆ CreateLogger()
Logger ara::log::Logger::CreateLogger |
( |
std::string |
ctxId, |
|
|
std::string |
ctxDescription, |
|
|
LogLevel |
ctxDefLogLevel |
|
) |
| |
|
static |
Logger factory.
- Parameters
-
ctxId | Context ID |
ctxDescription | Context description |
ctxDefLogLevel | Context default log level |
- Returns
- A new logger for that specifc context
- Note
- Log with less severity than the default log level are ignored.
◆ IsEnabled()
bool ara::log::Logger::IsEnabled |
( |
LogLevel |
logLevel | ) |
const |
|
noexcept |
Determine whether a certian log level is enabled in the current context or not.
- Parameters
-
logLevel | Input log severity level |
- Returns
- True if the level is enabled; otherwise false
◆ LogDebug()
LogStream ara::log::Logger::LogDebug |
( |
| ) |
const |
Create a stream for debug logs.
- Returns
- Debug log stream in the current context
- See also
- WithLevel
◆ LogError()
LogStream ara::log::Logger::LogError |
( |
| ) |
const |
Create a stream for error logs.
- Returns
- Error log stream in the current context
- See also
- WithLevel
◆ LogFatal()
LogStream ara::log::Logger::LogFatal |
( |
| ) |
const |
Create a stream for fatal logs.
- Returns
- Fatal log stream in the current context
- See also
- WithLevel
◆ LogInfo()
LogStream ara::log::Logger::LogInfo |
( |
| ) |
const |
Create a stream for information logs.
- Returns
- Information log stream in the current context
- See also
- WithLevel
◆ LogVerbose()
LogStream ara::log::Logger::LogVerbose |
( |
| ) |
const |
Create a stream for verbose logs.
- Returns
- Verbose log stream in the current context
- See also
- WithLevel
◆ LogWarn()
LogStream ara::log::Logger::LogWarn |
( |
| ) |
const |
Create a stream for warning logs.
- Returns
- Warning log stream in the current context
- See also
- WithLevel
◆ RemoteClientState()
ClientState ara::log::Logger::RemoteClientState |
( |
| ) |
const |
|
noexcept |
Remote logging client connection state.
- Returns
- Client connection state
◆ WithLevel()
Create a stream for certian level logs.
- Parameters
-
logLevel | Input log severity level |
- Returns
- Log stream with the determined level in the current context