TrinityCore
AppenderConsole Class Reference

#include <AppenderConsole.h>

+ Inheritance diagram for AppenderConsole:

Public Member Functions

 AppenderConsole (uint8 _id, std::string 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 name, LogLevel level=LOG_LEVEL_DISABLED, AppenderFlags flags=APPENDER_FLAGS_NONE)
 
 Appender (Appender const &)=delete
 
 Appender (Appender &&)=delete
 
Appenderoperator= (Appender const &)=delete
 
Appenderoperator= (Appender &&)=delete
 
virtual ~Appender ()
 
uint8 getId () const
 
std::string const & getName () const
 
virtual AppenderType getType () const =0
 
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 &prefix, std::string const &text, 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)
 

Detailed Description

Definition at line 45 of file AppenderConsole.h.

Constructor & Destructor Documentation

◆ AppenderConsole()

AppenderConsole::AppenderConsole ( uint8  _id,
std::string  name,
LogLevel  level,
AppenderFlags  flags,
std::vector< std::string_view > const &  args 
)

Definition at line 30 of file AppenderConsole.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ _write()

void AppenderConsole::_write ( LogMessage const *  message)
overrideprivatevirtual

Implements Appender.

Definition at line 177 of file AppenderConsole.cpp.

+ Here is the call graph for this function:

◆ getType()

AppenderType AppenderConsole::getType ( ) const
inlineoverridevirtual

Implements Appender.

Definition at line 52 of file AppenderConsole.h.

◆ InitColors()

void AppenderConsole::InitColors ( std::string const &  name,
std::string_view  init_str 
)

Definition at line 39 of file AppenderConsole.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Print()

void AppenderConsole::Print ( std::string const &  prefix,
std::string const &  text,
bool  error 
)
private

Definition at line 165 of file AppenderConsole.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResetColor()

void AppenderConsole::ResetColor ( bool  stdout_stream)
private

Definition at line 155 of file AppenderConsole.cpp.

+ Here is the caller graph for this function:

◆ SetColor()

void AppenderConsole::SetColor ( bool  stdout_stream,
ColorTypes  color 
)
private

Definition at line 68 of file AppenderConsole.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ _colored

bool AppenderConsole::_colored
private

Definition at line 59 of file AppenderConsole.h.

◆ _colors

ColorTypes AppenderConsole::_colors[NUM_ENABLED_LOG_LEVELS]
private

Definition at line 60 of file AppenderConsole.h.

◆ type

constexpr AppenderType AppenderConsole::type = APPENDER_CONSOLE
staticconstexpr

Definition at line 48 of file AppenderConsole.h.


The documentation for this class was generated from the following files: