![]() |
TrinityCore
|
#include <AppenderConsole.h>
Inheritance diagram for AppenderConsole:Public Member Functions | |
| AppenderConsole (uint8 _id, std::string const &name, LogLevel level, AppenderFlags flags, std::vector< std::string_view > const &args) | |
| void | InitColors (std::string const &name, std::string_view init_str) |
| AppenderType | getType () const override |
Public Member Functions inherited from Appender | |
| Appender (uint8 _id, std::string const &name, LogLevel level=LOG_LEVEL_DISABLED, AppenderFlags flags=APPENDER_FLAGS_NONE) | |
| virtual | ~Appender () |
| uint8 | getId () const |
| std::string const & | getName () const |
| LogLevel | getLogLevel () const |
| AppenderFlags | getFlags () const |
| void | setLogLevel (LogLevel) |
| void | write (LogMessage *message) |
| virtual void | setRealmId (uint32) |
Static Public Attributes | |
| static constexpr AppenderType | type = APPENDER_CONSOLE |
Private Member Functions | |
| void | SetColor (bool stdout_stream, ColorTypes color) |
| void | ResetColor (bool stdout_stream) |
| void | Print (std::string const &str, bool error) |
| void | _write (LogMessage const *message) override |
Private Attributes | |
| bool | _colored |
| ColorTypes | _colors [NUM_ENABLED_LOG_LEVELS] |
Additional Inherited Members | |
Static Public Member Functions inherited from Appender | |
| static char const * | getLogLevelString (LogLevel level) |
Definition at line 44 of file AppenderConsole.h.
| AppenderConsole::AppenderConsole | ( | uint8 | _id, |
| std::string const & | name, | ||
| LogLevel | level, | ||
| AppenderFlags | flags, | ||
| std::vector< std::string_view > const & | args | ||
| ) |
Definition at line 30 of file AppenderConsole.cpp.
References _colors, InitColors(), Appender::name, NUM_COLOR_TYPES, and NUM_ENABLED_LOG_LEVELS.
|
overrideprivatevirtual |
Implements Appender.
Definition at line 175 of file AppenderConsole.cpp.
References _colored, _colors, LogMessage::level, LOG_LEVEL_DEBUG, LOG_LEVEL_ERROR, LOG_LEVEL_FATAL, LOG_LEVEL_INFO, LOG_LEVEL_TRACE, LOG_LEVEL_WARN, LogMessage::prefix, Print(), ResetColor(), SetColor(), and LogMessage::text.
|
inlineoverridevirtual |
Implements Appender.
Definition at line 51 of file AppenderConsole.h.
| void AppenderConsole::InitColors | ( | std::string const & | name, |
| std::string_view | init_str | ||
| ) |
Definition at line 40 of file AppenderConsole.cpp.
References _colored, _colors, Appender::name, NUM_ENABLED_LOG_LEVELS, Trinity::StringFormat(), Trinity::Tokenize(), and EnumUtils::ToTitle().
Referenced by AppenderConsole().
|
private |
Definition at line 166 of file AppenderConsole.cpp.
References utf8printf(), and WriteWinConsole().
Referenced by _write().
|
private |
Definition at line 156 of file AppenderConsole.cpp.
Referenced by _write().
|
private |
Definition at line 69 of file AppenderConsole.cpp.
References NUM_COLOR_TYPES, and YELLOW.
Referenced by _write().
|
private |
Definition at line 58 of file AppenderConsole.h.
Referenced by _write(), and InitColors().
|
private |
Definition at line 59 of file AppenderConsole.h.
Referenced by _write(), AppenderConsole(), and InitColors().
|
staticconstexpr |
Definition at line 47 of file AppenderConsole.h.