Sese Framework
2.3.0
A cross-platform framework
|
Asynchronous logger. More...
#include <AsyncLogger.h>
Public Member Functions | |
AsyncLogger () | |
~AsyncLogger () noexcept override | |
void | log (const Event::Ptr &event) noexcept override |
void | dump (const void *buffer, size_t length) noexcept override |
void | loop () noexcept |
Public Member Functions inherited from sese::record::Logger | |
Logger () noexcept | |
virtual | ~Logger () noexcept=default |
void | addAppender (const AbstractAppender::Ptr &appender) noexcept |
void | removeAppender (const AbstractAppender::Ptr &appender) noexcept |
Protected Attributes | |
io::FixedBuilder * | currentBuffer |
io::FixedBuilder * | nextBuffer |
std::vector< io::FixedBuilder * > | buffer2Ready |
std::mutex | mutex |
std::condition_variable | conditionVariable |
std::atomic_bool | isShutdown {} |
sese::Thread::Ptr | thread |
Protected Attributes inherited from sese::record::Logger | |
std::shared_ptr< AbstractFormatter > | formatter |
std::shared_ptr< ConsoleAppender > | builtInAppender |
std::vector< AbstractAppender::Ptr > | appenderVector |
Additional Inherited Members | |
Public Types inherited from sese::record::Logger | |
typedef std::shared_ptr< Logger > | Ptr |
Static Public Member Functions inherited from sese::record::Logger | |
template<typename... ARGS> | |
static void | debug (PatternAndLocation pattern_and_location, ARGS &&...args) |
static void | debug (PatternAndLocation pattern_and_location) |
template<typename... ARGS> | |
static void | info (PatternAndLocation pattern_and_location, ARGS &&...args) |
static void | info (PatternAndLocation pattern_and_location) |
template<typename... ARGS> | |
static void | warn (PatternAndLocation pattern_and_location, ARGS &&...args) |
static void | warn (PatternAndLocation pattern_and_location) |
template<typename... ARGS> | |
static void | error (PatternAndLocation pattern_and_location, ARGS &&...args) |
static void | error (PatternAndLocation pattern_and_location) |
static void | addGlobalLoggerAppender (const AbstractAppender::Ptr &appender) noexcept |
static void | removeGlobalLoggerAppender (const AbstractAppender::Ptr &appender) noexcept |
Asynchronous logger.
AsyncLogger::AsyncLogger | ( | ) |
References currentBuffer, isShutdown, loop(), nextBuffer, RECORD_BUFFER_SIZE, and thread.
|
overridenoexcept |
References conditionVariable, currentBuffer, isShutdown, nextBuffer, and thread.
|
overridevirtualnoexcept |
Output raw content
buffer | Buffer |
length | Length of buffer |
Reimplemented from sese::record::Logger.
References RECORD_BUFFER_SIZE.
|
overridevirtualnoexcept |
Output log
event | Log event |
Reimplemented from sese::record::Logger.
References RECORD_BUFFER_SIZE.
|
noexcept |
References sese::record::Logger::appenderVector, buffer2Ready, sese::record::Logger::builtInAppender, conditionVariable, currentBuffer, isShutdown, mutex, nextBuffer, and RECORD_BUFFER_SIZE.
Referenced by AsyncLogger().
|
protected |
Referenced by loop().
|
protected |
Referenced by loop(), and ~AsyncLogger().
|
protected |
Referenced by AsyncLogger(), loop(), and ~AsyncLogger().
|
protected |
Referenced by AsyncLogger(), loop(), and ~AsyncLogger().
|
protected |
Referenced by loop().
|
protected |
Referenced by AsyncLogger(), loop(), and ~AsyncLogger().
|
protected |
Referenced by AsyncLogger(), and ~AsyncLogger().