class final
#include <include/logging.hpp>
v_1_0_0::Logger Logs a message to its registered Appenders.
A Logger associates a configuration with a set of Appenders. Can be configured to log timestamps. The default is true
.
Constructors, destructors, conversion operators
Public functions
- void add_appender(std::unique_ptr<Appender> appender)
- Add an Appender to this Logger.
- auto has_timestamps() const -> bool noexcept
- Returns TRUE iff this instance is configured to log timestamps.
- void log(const std::string& msg) const
- Log the given message to all Appenders.
- void remove_appender(const Appender* appender)
- Remove the given Appender from this Logger.
- void set_timestamps(const bool& onoff) noexcept
- Activates or deactivates the output of timestamps.
Function documentation
void arcstk:: v_1_0_0:: Logger:: add_appender(std::unique_ptr<Appender> appender)
Add an Appender to this Logger.
Parameters | |
---|---|
appender in | An Appender to use |
bool arcstk:: v_1_0_0:: Logger:: has_timestamps() const noexcept
Returns TRUE iff this instance is configured to log timestamps.
Returns | TRUE iff this instance will log timestamps. |
---|
void arcstk:: v_1_0_0:: Logger:: remove_appender(const Appender* appender)
Remove the given Appender from this Logger.
Parameters | |
---|---|
appender in | An Appender to remove |
void arcstk:: v_1_0_0:: Logger:: set_timestamps(const bool& onoff) noexcept
Activates or deactivates the output of timestamps.
Parameters | |
---|---|
onoff in | TRUE activates the logging of timestamps for this logger |