3#include <initializer_list>
31 static void DefaultRaisedCb(
const Log &log);
33 static void DefaultOutputCb(
const Array<Log> &logs);
39 static bool immediate;
52 static void Raise(
Log log);
55 static Log GetLastLog();
57 static void EnableImmediateMode(
bool enable);
66 Log(
LogType type,
const std::initializer_list<Str_8> &tags, UInt_64 code,
Str_8 msg);
80 Log &operator=(
Log &&log)
noexcept;
85 Log &operator=(
const Log &log);
104 bool HasTags(
const std::initializer_list<Str_8> &tags)
const;
114 bool HasTag(
const Str_8 &tag)
const;
120 UInt_64 GetCode()
const;
124 Str_8 GetMsg()
const;
131 bool IsValid()
const;
137 #define EHS_LOG_INT(type, code, msg) ehs::Log::Raise(ehs::Log(type, {ehs::GetAcronym_8(), EHS_FILE, EHS_FUNC, ehs::Str_8::FromNum((ehs::UInt_32)EHS_LINE)}, code, msg))
139 #define EHS_LOG_INT(type, code, msg) ehs::Log::Raise(ehs::Log(type, {ehs::GetAcronym_8(), EHS_FUNC}, code, msg))
145 #define EHS_LOG(type, code, msg) ehs::Log::Raise(ehs::Log(type, {ehs::GetAppName_8(), EHS_FILE, EHS_FUNC, ehs::Str_8::FromNum((ehs::UInt_32)EHS_LINE)}, code, msg))
147 #define EHS_LOG(type, code, msg) ehs::Log::Raise(ehs::Log(type, {ehs::GetAppName_8(), EHS_FUNC}, code, msg))
151#ifndef EHS_LOG_SUCCESS
152#define EHS_LOG_SUCCESS() ehs::Log::Raise({})
void(* LogOutputCb)(const Array< Log > &)
Definition: Log.h:15
unsigned char UInt_8
Definition: Types.h:43
void(* LogRaisedCb)(const Log &)
Definition: Log.h:14
LogType
Definition: Log.h:18