iox::log::Logger🔗
#include <iceoryx_hoofs/log/logger.hpp>
Public Functions🔗
Name | |
---|---|
Logger(Logger && other) | |
Logger & | operator=(Logger && rhs) |
Logger(const Logger & other) | |
Logger & | operator=(const Logger & rhs) |
LogLevel | GetLogLevel() const Getter method for the current LogLevel. |
void | SetLogLevel(const LogLevel logLevel) Sets the LogLevel for the Logger. |
cxx::GenericRAII | SetLogLevelForScope(const LogLevel logLevel) Sets the LogLevel to the given level for the lifetime of the GenericRAII object and then sets it back to the previous one. |
void | SetLogMode(const LogMode logMode) |
bool | IsEnabled(const LogLevel logLevel) const |
LogStream | LogFatal() |
LogStream | LogError() |
LogStream | LogWarn() |
LogStream | LogInfo() |
LogStream | LogDebug() |
LogStream | LogVerbose() |
Protected Functions🔗
Name | |
---|---|
Logger(const std::string & ctxId, const std::string & ctxDescription, const LogLevel appLogLevel) | |
virtual void | Log(const LogEntry & entry) const |
Friends🔗
Name | |
---|---|
class | LogManager |
class | LogStream |
Detailed Description🔗
class iox::log::Logger;
Todo: for asynchronous logging, make the logger an active object according to Herb Sutter https://herbsutter.com/2010/07/12/effective-concurrency-prefer-using-active-objects-instead-of-naked-threads/
Public Functions Documentation🔗
function Logger🔗
Logger(
Logger && other
)
function operator=🔗
Logger & operator=(
Logger && rhs
)
function Logger🔗
Logger(
const Logger & other
)
function operator=🔗
Logger & operator=(
const Logger & rhs
)
function GetLogLevel🔗
LogLevel GetLogLevel() const
Getter method for the current LogLevel.
Return: the current LogLevel
function SetLogLevel🔗
void SetLogLevel(
const LogLevel logLevel
)
Sets the LogLevel for the Logger.
Parameters:
- logLevel to be set
function SetLogLevelForScope🔗
cxx::GenericRAII SetLogLevelForScope(
const LogLevel logLevel
)
Sets the LogLevel to the given level for the lifetime of the GenericRAII object and then sets it back to the previous one.
Parameters:
- logLevel to be set temporarily
Return: a scope guard which resets the LogLevel to the value at the time when this method was called
function SetLogMode🔗
void SetLogMode(
const LogMode logMode
)
function IsEnabled🔗
bool IsEnabled(
const LogLevel logLevel
) const
function LogFatal🔗
LogStream LogFatal()
function LogError🔗
LogStream LogError()
function LogWarn🔗
LogStream LogWarn()
function LogInfo🔗
LogStream LogInfo()
function LogDebug🔗
LogStream LogDebug()
function LogVerbose🔗
LogStream LogVerbose()
Protected Functions Documentation🔗
function Logger🔗
Logger(
const std::string & ctxId,
const std::string & ctxDescription,
const LogLevel appLogLevel
)
function Log🔗
virtual void Log(
const LogEntry & entry
) const
Friends🔗
friend LogManager🔗
friend class LogManager(
LogManager
);
friend LogStream🔗
friend class LogStream(
LogStream
);
Todo: LogStream needs to call Log(); do we want to make Log() public?
Updated on 17 March 2022 at 12:15:57 CET