40 struct tm timeinforeal;
41 timeinfo = &timeinforeal;
42 localtime_s(timeinfo, &rawtime);
44 timeinfo = localtime(&rawtime);
49 Printf(Line,
"[%04llx|%02d:%02d:%02d] %s\n", static_cast<UInt64>(std::hash<std::thread::id>()(std::this_thread::get_id())), timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, a_Message.c_str());
51 Printf(Line,
"[%02d:%02d:%02d] %s\n", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, a_Message.c_str());
77 LogSimple(fmt::format(a_Format, a_ArgList), a_LogLevel);
86 auto nonOwning = a_Listener.get();
105 [=](std::unique_ptr<cListener> & a_OtherListener) ->
bool 107 return a_OtherListener.get() == a_Listener;
120 void FLOG(
const char * a_Format, fmt::ArgList a_ArgList)
129 void FLOGINFO(
const char * a_Format, fmt::ArgList a_ArgList)
147 void FLOGERROR(
const char * a_Format, fmt::ArgList a_ArgList)
156 void LOG(
const char * a_Format, fmt::ArgList a_ArgList)
165 void LOGINFO(
const char * a_Format, fmt::ArgList a_ArgList)
174 void LOGWARNING(
const char * a_Format, fmt::ArgList a_ArgList)
183 void LOGERROR(
const char * a_Format, fmt::ArgList a_ArgList)
std::vector< std::unique_ptr< cListener > > m_LogListeners
void DetachListener(cListener *a_Listener)
cAttachment AttachListener(std::unique_ptr< cListener > a_Listener)
void LogFormat(const char *a_Format, eLogLevel a_LogLevel, fmt::ArgList a_ArgList)
Log a message formatted with a python style formatting string.
void LOGERROR(const char *a_Format, fmt::ArgList a_ArgList)
void FLOGERROR(const char *a_Format, fmt::ArgList a_ArgList)
void LogSimple(AString a_Message, eLogLevel a_LogLevel=llRegular)
Logs the simple text message at the specified log level.
static cLogger & GetInstance(void)
void LOGINFO(const char *a_Format, fmt::ArgList a_ArgList)
AString & Printf(AString &str, const char *format, fmt::ArgList args)
Output the formatted text into the string.
void LOGWARNING(const char *a_Format, fmt::ArgList a_ArgList)
void FLOGWARNING(const char *a_Format, fmt::ArgList a_ArgList)
void LOG(const char *a_Format, fmt::ArgList a_ArgList)
void LogPrintf(const char *a_Format, eLogLevel a_LogLevel, fmt::ArgList a_ArgList)
Log a message formatted with a printf style formatting string.
RAII for cCriticalSection - locks the CS on creation, unlocks on destruction.
void FLOG(const char *a_Format, fmt::ArgList a_ArgList)
cCriticalSection m_CriticalSection
static void InitiateMultithreading()
void FLOGINFO(const char *a_Format, fmt::ArgList a_ArgList)