21 #include <unordered_map>
25 #include <type_traits>
65 : level(_level), type(_type), text(
std::forward<
std::string>(_text)), mtime(time(
NULL))
71 static std::string getTimeStr(time_t time);
72 std::string getTimeStr();
84 return static_cast<uint32>(prefix.size() + text.size());
95 std::string
const& getName()
const;
102 static const char* getLogLevelString(
LogLevel level);
120 template<
class AppenderImpl>
123 return new AppenderImpl(
id, name, level, flags, std::forward<ExtraAppenderArgs>(extraArgs));
std::unordered_map< uint8, AppenderCreatorFn > AppenderCreatorMap
Definition: Appender.h:118
std::string const type
Definition: Appender.h:75
std::string prefix
Definition: Appender.h:77
Definition: Appender.h:35
Definition: Appender.h:34
Definition: Appender.h:55
AppenderType
Definition: Appender.h:44
Definition: Appender.h:36
Definition: Appender.h:37
LogLevel const level
Definition: Appender.h:74
std::string const text
Definition: Appender.h:76
std::unordered_map< uint8, Appender * > AppenderMap
Definition: Appender.h:114
arena_t NULL
Definition: jemalloc_internal.h:624
uint32 Size() const
@ Returns size of the log message content in bytes
Definition: Appender.h:82
std::vector< char const * > ExtraAppenderArgs
Definition: Appender.h:116
Definition: Appender.h:38
uint8 id
Definition: Appender.h:108
Definition: Appender.h:46
AppenderFlags
Definition: Appender.h:52
Definition: Appender.h:57
Definition: Appender.h:56
Definition: Appender.h:62
Definition: Appender.h:126
Definition: Appender.h:33
Vector2int16 & operator=(const Any &a)
uint32_t uint32
Definition: Define.h:150
LogLevel
Definition: Appender.h:31
virtual void setRealmId(uint32)
Definition: Appender.h:103
Definition: Appender.h:58
std::string name
Definition: Appender.h:109
#define TC_COMMON_API
Definition: Define.h:116
AppenderFlags flags
Definition: Appender.h:111
Definition: Appender.h:54
Definition: Appender.h:59
const uint8 MaxLogLevels
Definition: Appender.h:42
Definition: Appender.h:39
InvalidAppenderArgsException(std::string const &message)
Definition: Appender.h:129
Definition: Appender.h:47
LogLevel level
Definition: Appender.h:110
uint8_t uint8
Definition: Define.h:152
time_t mtime
Definition: Appender.h:79
Definition: Appender.h:48
uint8 flags
Definition: DisableMgr.cpp:44
std::string param1
Definition: Appender.h:78
Definition: Appender.h:88
Appender * CreateAppender(uint8 id, std::string const &name, LogLevel level, AppenderFlags flags, ExtraAppenderArgs extraArgs)
Definition: Appender.h:121
LogMessage(LogLevel _level, std::string const &_type, std::string &&_text)
Definition: Appender.h:64
Definition: Appender.h:49