|
RADLib
RADical C++ application framework
|
Async process-wide logger. More...
#include <RADLogging.h>
Public Member Functions | |
| void | start () |
| Starts worker thread. More... | |
| void | flush () |
| Flushes queued log messages. More... | |
| void | shutdown () |
| Stops worker thread after draining queued messages. More... | |
| void | setLevel (Level level) |
| Sets minimum level. More... | |
| Level | level () const |
| Returns minimum level. More... | |
| void | setCategoryEnabled (const std::string &category, bool enabled) |
| Enables or disables a category. More... | |
| bool | shouldLog (Level level, const std::string &category) const |
| Returns true when a message should be accepted. More... | |
| void | addSink (std::shared_ptr< Sink > sink) |
| Adds a sink. Existing sinks are preserved. More... | |
| void | clearSinks () |
| Removes all sinks. More... | |
| void | log (Level level, std::string category, std::string message) |
| Queues one log message. More... | |
Static Public Member Functions | |
| static Logger & | instance () |
| Returns singleton logger. More... | |
Async process-wide logger.
| void RADLogging::Logger::addSink | ( | std::shared_ptr< Sink > | sink | ) |
Adds a sink. Existing sinks are preserved.
| void RADLogging::Logger::clearSinks | ( | ) |
Removes all sinks.
| void RADLogging::Logger::flush | ( | ) |
Flushes queued log messages.
|
static |
Returns singleton logger.
| Level RADLogging::Logger::level | ( | ) | const |
Returns minimum level.
| void RADLogging::Logger::log | ( | Level | level, |
| std::string | category, | ||
| std::string | message | ||
| ) |
Queues one log message.
| void RADLogging::Logger::setCategoryEnabled | ( | const std::string & | category, |
| bool | enabled | ||
| ) |
Enables or disables a category.
| void RADLogging::Logger::setLevel | ( | Level | level | ) |
Sets minimum level.
| bool RADLogging::Logger::shouldLog | ( | Level | level, |
| const std::string & | category | ||
| ) | const |
Returns true when a message should be accepted.
| void RADLogging::Logger::shutdown | ( | ) |
Stops worker thread after draining queued messages.
| void RADLogging::Logger::start | ( | ) |
Starts worker thread.