Sese Framework
2.3.0
A cross-platform framework
|
#include <Logger.h>
Classes | |
struct | PatternAndLocation |
Public Types | |
typedef std::shared_ptr< Logger > | Ptr |
Public Member Functions | |
Logger () noexcept | |
virtual | ~Logger () noexcept=default |
void | addAppender (const AbstractAppender::Ptr &appender) noexcept |
void | removeAppender (const AbstractAppender::Ptr &appender) noexcept |
virtual void | log (const Event::Ptr &event) noexcept |
virtual void | dump (const void *buffer, size_t length) noexcept |
Static Public Member Functions | |
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 |
Protected Attributes | |
std::shared_ptr< AbstractFormatter > | formatter |
std::shared_ptr< ConsoleAppender > | builtInAppender |
std::vector< AbstractAppender::Ptr > | appenderVector |
Static Private Member Functions | |
static void | prelog (PatternAndLocation &pattern_and_location, Level level, const std::string &string) noexcept |
Logger class.
typedef std::shared_ptr<Logger> sese::record::Logger::Ptr |
|
noexcept |
References builtInAppender, sese::record::DEBUG, formatter, and sese::record::INFO.
|
virtualdefaultnoexcept |
|
noexcept |
|
staticnoexcept |
Add log appender to global logger
appender | Log appender |
References addAppender(), and sese::record::logger.
|
static |
References sese::record::DEBUG, sese::record::Logger::PatternAndLocation::pattern, and prelog().
|
static |
References sese::record::DEBUG, and sese::text::fmt().
|
virtualnoexcept |
Output raw content
buffer | Buffer |
length | Length of buffer |
Reimplemented in sese::record::AsyncLogger.
Referenced by sese::Exception::printStacktrace().
|
static |
References sese::record::ERR, sese::record::Logger::PatternAndLocation::pattern, and prelog().
|
static |
|
static |
References sese::record::INFO, sese::record::Logger::PatternAndLocation::pattern, and prelog().
|
static |
|
virtualnoexcept |
Output log
event | Log event |
Reimplemented in sese::record::AsyncLogger.
References sese::record::DEBUG, sese::record::ERR, sese::record::INFO, sese::record::ConsoleAppender::setCleanColor(), sese::record::ConsoleAppender::setDebugColor(), sese::record::ConsoleAppender::setErrorColor(), sese::record::ConsoleAppender::setInfoColor(), sese::record::ConsoleAppender::setWarnColor(), and sese::record::WARN.
Referenced by prelog().
|
staticprivatenoexcept |
|
noexcept |
|
staticnoexcept |
Remove log appender from global logger
appender | Log appender |
References sese::record::logger, and removeAppender().
|
static |
References sese::record::Logger::PatternAndLocation::pattern, prelog(), and sese::record::WARN.
|
static |
|
protected |
Referenced by sese::record::AsyncLogger::loop().
|
protected |
Referenced by Logger(), and sese::record::AsyncLogger::loop().
|
protected |
Referenced by Logger().