10 #ifndef NO_PRAGMA_ONCE
80 return m_LogFilter.
IsLogged(uAttrMask, eLogLevel);
83 virtual HRESULT FlushLogs()
override;
94 bool HasAppender(
cLogAppender* pAppender,
bool bDescend =
false)
const;
96 bool RemoveAppender(
cLogAppender* pAppender,
bool bDescend =
false);
99 bool RemoveAppenderType(
const TYPEINFO_t& rType,
bool bDescend=
true)
101 return RemoveAppender(FindAppenderType(rType, bDescend), bDescend);
132 virtual HRESULT WriteString(
const wchar_t* pszStr)
override;
140 #define LOGF(_x_) ::Gray::cLogMgr::I().addEventF _x_
144 #define DEBUG_ERR(_x_) ::Gray::cLogMgr::I().addDebugErrorF _x_
145 #define DEBUG_WARN(_x_) ::Gray::cLogMgr::I().addDebugWarnF _x_
149 #if ! defined(DEBUG_MSG) && ! defined(USE_DEBUG_LOG) && ( defined(_DEBUG) || defined(_DEBUG_FAST))
150 #define USE_DEBUG_LOG
153 #define DEBUG_LOGF(_x_) ::Gray::cLogMgr::I().addEventF _x_
154 #define DEBUG_MSG(_x_) ::Gray::cLogMgr::I().addDebugInfoF _x_
155 #define DEBUG_TRACE(_x_) ::Gray::cLogMgr::I().addDebugTraceF _x_
157 #define DEBUG_LOGF(_x_) __noop
158 #define DEBUG_MSG(_x_) __noop
159 #define DEBUG_TRACE(_x_) __noop
164 #define GEXCEP_CATCH_LOG(desc) GRAY_TRY_CATCH( ::Gray::cExceptionBase, ex )\
166 ::Gray::cExceptionHolder exh(ex);\
167 ::Gray::cLogMgr::I().LogExceptionV(&exh,desc,nullptr);\
170 #define GEXCEP_CATCH_LOG1(desc,arg) GRAY_TRY_CATCH( ::Gray::cExceptionBase, ex )\
172 ::Gray::cExceptionHolder exh(ex);\
173 ::Gray::cLogMgr::I().LogExceptionF(&exh,desc,arg);\
176 #define GEXCEP_CATCH_LOG(desc) GRAY_TRY_CATCH( ::Gray::cExceptionBase, ex )
177 #define GEXCEP_CATCH_LOG1(desc,arg) GRAY_TRY_CATCH( ::Gray::cExceptionBase, ex )
#define GRAYCORE_LINK
Definition: GrayCore.h:47
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define CHEAPOBJECT_IMPL
Definition: cHeapObject.h:32
#define UNITTEST_FRIEND(n)
Define this in the class body to be unit tested. Allow the unit test to access private/protected stuf...
Definition: cUnitTestDecl.h:17
REF_t GetAtCheck(ITERATE_t index) const
Definition: cArray.h:834
Definition: cArrayIUnk.h:19
Definition: cException.h:28
Definition: cLogAppender.h:257
Definition: cLogAppender.h:72
bool IsLogged(LOG_ATTR_MASK_t uAttrMask, LOGLEV_TYPE eLogLevel) const
Definition: cLogAppender.h:117
Definition: cLogEvent.h:18
Definition: cLogMgr.h:108
virtual const cLogNexus * get_ThisLogNexus() const override
Definition: cLogMgr.h:72
virtual bool IsLogged(LOG_ATTR_MASK_t uAttrMask, LOGLEV_TYPE eLogLevel) const override
Definition: cLogMgr.h:77
const cLogAppender * EnumAppender(ITERATE_t i) const
Definition: cLogMgr.h:90
cLogAppender * EnumAppender(ITERATE_t i)
Definition: cLogMgr.h:86
cArrayIUnk< cLogAppender > m_aAppenders
where do the log messages go? child appenders.
Definition: cLogMgr.h:66
cThreadLockCount m_LockLog
serialize multiple threads for m_aAppenders
Definition: cLogMgr.h:63
cLogEventParams m_LogFilter
Union filter what goes out to ALL appenders.
Definition: cLogMgr.h:61
cLogThrottle m_LogThrottle
Measure how fast messages are going.
Definition: cLogMgr.h:62
Definition: cLogAppender.h:168
const char * m_pszSubject
static string. general subject matter tag.
Definition: cLogMgr.h:42
Definition: cLogAppender.h:129
Definition: cSingleton.h:127
Definition: cThreadLock.h:498
< The main namespace for all Core functions.
Definition: GrayCore.cpp:14
@ LOG_ATTR_ALL_MASK
Definition: cLogAppender.h:54
LOGLEV_TYPE
Definition: cLogLevel.h:22
UINT32 LOG_ATTR_MASK_t
Definition: cLogAppender.h:56
int ITERATE_t
like size_t but signed
Definition: Index.h:28
int TIMESECD_t
signed delta seconds. like TIMESEC_t. redefined in TimeUnits.h.
Definition: cTimeSys.h:19
std::type_info TYPEINFO_t
Definition: cTypeInfo.h:29
char LOGCHAR_t
always just use UTF8 for logs, don't bother with UNICODE.
Definition: cLogLevel.h:17