arcstk::v_1_0_0::Logging class final

A singleton interface used by all Log instances.

A singleton manager and thread safe interface class for all Logs of the entire component.

Public static functions

static auto instance() -> Logging&
Handle for the singleton.

Constructors, destructors, conversion operators

Logging(const Logging&) deleted
Class is non-copyable.
Logging(Logging&&) deleted noexcept
Class is non-movable.
~Logging() virtual noexcept
Virtual default destructor.

Public functions

void add_appender(std::unique_ptr<Appender> appender)
Add an appender to the internal Logger.
auto has_level(LOGLEVEL level) -> bool noexcept
Return TRUE iff the global log level is greater or equal than level.
auto has_timestamps() -> bool noexcept
Returns TRUE iff output of timestamps is activated, otherwise FALSE.
auto level() const -> LOGLEVEL
Returns the current log level.
auto logger() -> const Logger&
Access the internal Logger.
void remove_appender(Appender* appender)
Remove given appender from the internal Logger.
void set_level(LOGLEVEL level)
Set the log level.
void set_timestamps(const bool& activate)
Activates or deactivates the output of timestamps.

Function documentation

static Logging& arcstk::v_1_0_0::Logging::instance()

Handle for the singleton.

Returns This instance

void arcstk::v_1_0_0::Logging::add_appender(std::unique_ptr<Appender> appender)

Add an appender to the internal Logger.

Parameters
appender in The Appender to add

bool arcstk::v_1_0_0::Logging::has_level(LOGLEVEL level) noexcept

Return TRUE iff the global log level is greater or equal than level.

Parameters
level in The level to check for
Returns TRUE iff Logger has at least the level passed

bool arcstk::v_1_0_0::Logging::has_timestamps() noexcept

Returns TRUE iff output of timestamps is activated, otherwise FALSE.

Returns TRUE iff timestamps are logged, otherwise FALSE.

LOGLEVEL arcstk::v_1_0_0::Logging::level() const

Returns the current log level.

Returns Current log level

const Logger& arcstk::v_1_0_0::Logging::logger()

Access the internal Logger.

Returns The internal logger object

void arcstk::v_1_0_0::Logging::remove_appender(Appender* appender)

Remove given appender from the internal Logger.

Parameters
appender in The Appender to remove

void arcstk::v_1_0_0::Logging::set_level(LOGLEVEL level)

Set the log level.

Parameters
level in Set the log level

void arcstk::v_1_0_0::Logging::set_timestamps(const bool& activate)

Activates or deactivates the output of timestamps.

Parameters
activate in TRUE activates logging of timestamps