Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cLogMgr Class Reference

#include <cLogMgr.h>

Inheritance diagram for Gray::cLogMgr:
Gray::cSingleton< cLogMgr > Gray::cLogNexus Gray::cSingletonStatic< TYPE > Gray::cSingletonRegister Gray::cLogProcessor Gray::CObject Gray::cHeapObject Gray::ILogProcessor Gray::cStreamOutput Gray::IHeapObject Gray::cStreamBase

Public Member Functions

virtual HRESULT WriteString (const LOGCHAR_t *pszStr) override
 cStreamOutput - for raw dumping of text into the log system. More...
 
virtual HRESULT WriteString (const wchar_t *pszStr) override
 
const void * get_HeapPtr () const noexcept override
 Get the top level (outermost, freeable) class pointer. I can delete get_HeapPtr(). More...
 
- Public Member Functions inherited from Gray::CObject
virtual ~CObject ()
 
virtual bool isValidCheck () const noexcept
 < memory allocation and structure definitions are valid. More...
 
virtual void AssertValid () const
 < memory allocation and structure definitions are valid. More...
 
virtual void Serialize (cArchive &a)
 
- Public Member Functions inherited from Gray::cHeapObject
 cHeapObject ()
 
virtual ~cHeapObject ()
 
bool IsValidInsideN (INT_PTR index) const
 
bool IsValidInsidePtr (void const *pTest) const
 
virtual size_t GetHeapStatsThis (OUT ITERATE_t &iAllocCount) const
 
virtual bool isValidCheck () const noexcept
 
- Public Member Functions inherited from Gray::cLogNexus
 cLogNexus (LOG_ATTR_MASK_t uAttrMask=LOG_ATTR_ALL_MASK, LOGLEV_TYPE eLogLevel=LOGLEV_ANY)
 
virtual ~cLogNexus ()
 
virtual const cLogNexusget_ThisLogNexus () const override
 
virtual bool IsLogged (LOG_ATTR_MASK_t uAttrMask, LOGLEV_TYPE eLogLevel) const override
 
virtual HRESULT addEvent (cLogEvent *pEvent) override
 
virtual HRESULT FlushLogs () override
 
cLogAppenderEnumAppender (ITERATE_t i)
 
const cLogAppenderEnumAppender (ITERATE_t i) const
 
bool HasAppender (cLogAppender *pAppender, bool bDescend=false) const
 
HRESULT AddAppender (cLogAppender *pAppender)
 
bool RemoveAppender (cLogAppender *pAppender, bool bDescend=false)
 
cLogAppenderFindAppenderType (const TYPEINFO_t &rType, bool bDescend=false) const
 
bool RemoveAppenderType (const TYPEINFO_t &rType, bool bDescend=true)
 
- Public Member Functions inherited from Gray::cLogProcessor
virtual ~cLogProcessor ()
 
HRESULT addEventS (LOG_ATTR_MASK_t uAttrMask, LOGLEV_TYPE eLogLevel, cStringL sMsg, cStringL sContext="")
 
HRESULT addEventV (LOG_ATTR_MASK_t uAttrMask, LOGLEV_TYPE eLogLevel, const LOGCHAR_t *pszFormat, va_list vargs)
 
HRESULT _cdecl addEventF (LOG_ATTR_MASK_t uAttrMask, LOGLEV_TYPE eLogLevel, const LOGCHAR_t *pszFormat,...)
 
HRESULT _cdecl addInfoF (const LOGCHAR_t *pszFormat,...)
 
HRESULT _cdecl addDebugErrorF (const LOGCHAR_t *pszFormat,...)
 
HRESULT _cdecl addDebugWarnF (const LOGCHAR_t *pszFormat,...)
 
HRESULT _cdecl addDebugInfoF (const LOGCHAR_t *pszFormat,...)
 
HRESULT _cdecl addDebugTraceF (const LOGCHAR_t *pszFormat,...)
 
- Public Member Functions inherited from Gray::cStreamOutput
 cStreamOutput () noexcept
 
virtual ~cStreamOutput ()
 
virtual HRESULT WriteX (const void *pData, size_t nDataSize)
 
HRESULT WriteT (const void *pVal, size_t nDataSize)
 
template<typename TYPE >
HRESULT WriteT (TYPE val)
 
HRESULT WriteSize (size_t nSize)
 
HRESULT WriteHashCode (HASHCODE_t nHashCode)
 
HRESULT WriteN (const void *pBuffer, size_t nSize)
 
template<typename _CH >
HRESULT WriteStringN (const _CH *pszStr)
 
template<typename _CH >
HRESULT WriteCharRepeat (_CH nChar, int nCount=1)
 
StrLen_t VPrintf (const char *pszFormat, va_list args)
 
StrLen_t VPrintf (const wchar_t *pszFormat, va_list args)
 
StrLen_t _cdecl Printf (const char *pszFormat,...)
 
StrLen_t _cdecl Printf (const wchar_t *pszFormat,...)
 
HRESULT WriteStream (cStreamInput &sInp, STREAM_POS_t nSizeMax=k_FILE_BLOCK_SIZE, IStreamProgressCallback *pProgress=nullptr, TIMESYSD_t nTimeout=0)
 Copy cStreamInput to this stream. More...
 
virtual HRESULT FlushX ()
 
- Public Member Functions inherited from Gray::cStreamBase
virtual ~cStreamBase ()
 
virtual STREAM_SEEKRET_t Seek (STREAM_OFFSET_t iOffset, SEEK_ORIGIN_TYPE eSeekOrigin=SEEK_Set)
 
void SeekToBegin ()
 
STREAM_POS_t SeekToEnd ()
 
virtual STREAM_POS_t GetPosition () const
 
virtual STREAM_POS_t GetLength () const
 

Protected Member Functions

 cLogMgr ()
 
virtual ~cLogMgr ()
 
- Protected Member Functions inherited from Gray::cSingleton< cLogMgr >
 cSingleton (cLogMgr *pObject, const TYPEINFO_t &rAddrCode=typeid(cLogMgr)) noexcept
 
virtual ~cSingleton ()
 
- Protected Member Functions inherited from Gray::cSingletonStatic< TYPE >
 cSingletonStatic (TYPE *pObject) noexcept
 
virtual ~cSingletonStatic () noexcept
 
- Protected Member Functions inherited from Gray::cSingletonRegister
 cSingletonRegister (const TYPEINFO_t &rAddrCode) noexcept
 
virtual ~cSingletonRegister ()
 
void RegisterSingleton ()
 

Friends

class cSingleton< cLogMgr >
 
class cLogMgrTests
 

Additional Inherited Members

- Static Public Member Functions inherited from Gray::cSingleton< cLogMgr >
static cLogMgr *__stdcall get_Single ()
 
static TYPE2 *__stdcall get_SingleT ()
 
static cLogMgr &__stdcall I ()
 
- Static Public Member Functions inherited from Gray::cSingletonStatic< TYPE >
static bool isSingleCreated () noexcept
 
static TYPEget_SingleU () noexcept
 
static TYPEget_Single ()
 
template<class TYPE2 >
static TYPE2 *__stdcall get_SingleCast ()
 
static TYPEI () noexcept
 
- Static Public Member Functions inherited from Gray::cSingletonRegister
static void __stdcall ReleaseModule (HMODULE hMod)
 
- Public Attributes inherited from Gray::cLogNexus
cLogEventParams m_LogFilter
 Union filter what goes out to ALL appenders. More...
 
cLogThrottle m_LogThrottle
 Measure how fast messages are going. More...
 
cThreadLockCount m_LockLog
 serialize multiple threads for m_aAppenders More...
 
- Static Public Attributes inherited from Gray::cSingletonRegister
static cThreadLockFast sm_LockSingle
 common lock for all cSingleton. More...
 
- Static Public Attributes inherited from Gray::cStreamBase
static const BYTE k_SIZE_MASK = 0x80
 Used for WriteSize() More...
 
static const size_t k_FILE_BLOCK_SIZE = (32 * 1024)
 default arbitrary transfer block size. more than this is NOT more efficient. More...
 
- Protected Attributes inherited from Gray::cSingletonRegister
HMODULE m_hModuleLoaded
 What modules loaded this ? So singletons can be destroyed if DLL/SO unloads. More...
 
- Protected Attributes inherited from Gray::cLogNexus
cArrayIUnk< cLogAppenderm_aAppenders
 where do the log messages go? child appenders. More...
 
- Static Protected Attributes inherited from Gray::cSingletonStatic< TYPE >
static TYPEsm_pThe = nullptr
 pointer to the one and only object of this TYPE. ASSUME automatically init to = nullptr. More...
 

Detailed Description

The root log message nexus. take in all log messages and decide where they go. Only one default singleton log manager per system.

Constructor & Destructor Documentation

◆ cLogMgr()

Gray::cLogMgr::cLogMgr ( )
protected

ideally this is in the very first static initialize.

◆ ~cLogMgr()

Gray::cLogMgr::~cLogMgr ( )
protectedvirtual

Member Function Documentation

◆ get_HeapPtr()

const void* Gray::cLogMgr::get_HeapPtr ( ) const
inlineoverridevirtualnoexcept

Get the top level (outermost, freeable) class pointer. I can delete get_HeapPtr().

Reimplemented from Gray::cHeapObject.

◆ WriteString() [1/2]

HRESULT Gray::cLogMgr::WriteString ( const LOGCHAR_t pszStr)
overridevirtual

cStreamOutput - for raw dumping of text into the log system.

Reimplemented from Gray::cStreamOutput.

◆ WriteString() [2/2]

HRESULT Gray::cLogMgr::WriteString ( const wchar_t *  pszStr)
overridevirtual

Reimplemented from Gray::cStreamOutput.

Friends And Related Function Documentation

◆ cLogMgrTests

friend class cLogMgrTests
friend

◆ cSingleton< cLogMgr >

friend class cSingleton< cLogMgr >
friend

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