Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ilog::CLoggerBase Class Reference

Base class implementing interface istd::ILogger sending log messages over ilog::IMessageConsumer. More...

#include <CLoggerBase.h>

Inheritance diagram for ilog::CLoggerBase:
ilog::ILoggable istd::ILogger istd::IPolymorphic istd::IPolymorphic ilog::TLoggerCompWrap< Base > ilog::TLoggerCompWrap< CFileTypeInfoComp > ilog::TLoggerCompWrap< ifile::CRelativeFileNameParamComp > ibase::CConsoleApplicationComp idoc::CMultiPageDocumentFilePersistenceComp ifile::CAutoPersistenceComp ifile::CFileListProviderComp ifile::CFileSystemInfoProviderComp ifilegui::CFileDialogLoaderComp iimg::CBitmapLoaderComp ipackage::CPackagesLoaderComp ipackage::CRegistriesManagerComp ipackage::CRegistryCodeSaverComp iqt::CClipboardSerializerComp iqt::CSettingsSerializerComp iqt::CTranslationManagerComp iqtgui::CProcessStartCommandComp ifile::CFileSerializerCompBase ifile::CGeneratedFileNameParamComp

Public Member Functions

 CLoggerBase ()
 
virtual void SetLogPtr (ilog::IMessageConsumer *logPtr)
 Install log. More...
 
virtual ilog::IMessageConsumerGetLogPtr () const
 Get log. More...
 
virtual void SetTracingEnabled (bool trace)
 Enable/disable tracing. More...
 
virtual bool IsTracingEnabled () const
 Returns true if tracing enabled. More...
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Protected Member Functions

bool SendInfoMessage (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send info message to log. More...
 
bool SendWarningMessage (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send warning message to log. More...
 
bool SendErrorMessage (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send error message to log. More...
 
bool SendCriticalMessage (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send critical message to log. More...
 
bool SendInfoMessageOnce (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send once info message to log. More...
 
bool SendWarningMessageOnce (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send once warning message to log. More...
 
bool SendErrorMessageOnce (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send once error message to log. More...
 
bool SendCriticalMessageOnce (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send once critical message to log. More...
 
bool SendUserMessage (const istd::IInformationProvider *messagePtr) const
 Send message with user object. More...
 
bool AllowMessageOnceAgain (int id)
 Reset message lock. More...
 
virtual void DecorateMessage (istd::IInformationProvider::InformationCategory category, int id, int flags, QString &message, QString &messageSource) const
 Decorate message parts before outputting. More...
 
virtual bool IsLogConsumed (const istd::IInformationProvider::InformationCategory *categoryPtr=NULL, const int *flagsPtr=NULL) const
 Check if any log message is consumed. More...
 
virtual bool SendLogMessage (istd::IInformationProvider::InformationCategory category, int id, const QString &message, const QString &messageSource, int flags=0) const
 Send any message to log. More...
 

Protected Attributes

QSet< int > m_onceMessageIds
 

Detailed Description

Base class implementing interface istd::ILogger sending log messages over ilog::IMessageConsumer.

Access to interface ilog::IMessageConsumer must be registered by user. To register it use interface ilog::ILoggable implemented by this wrapper.

Definition at line 24 of file CLoggerBase.h.

Constructor & Destructor Documentation

ilog::CLoggerBase::CLoggerBase ( )

Member Function Documentation

bool ilog::CLoggerBase::AllowMessageOnceAgain ( int  id)
protected

Reset message lock.

Enable message to be send again. Agains to SendXXXlMessageOnce for id will be sent once again.

Parameters
idbinary id identifying this message type for automatic processing.
virtual void ilog::CLoggerBase::DecorateMessage ( istd::IInformationProvider::InformationCategory  category,
int  id,
int  flags,
QString &  message,
QString &  messageSource 
) const
protectedvirtual

Decorate message parts before outputting.

It is designed to be overloaded if you want to change the decoration.

Reimplemented from istd::ILogger.

Reimplemented in ilog::TLoggerCompWrap< Base >, ilog::TLoggerCompWrap< CFileTypeInfoComp >, and ilog::TLoggerCompWrap< ifile::CRelativeFileNameParamComp >.

virtual ilog::IMessageConsumer* ilog::CLoggerBase::GetLogPtr ( ) const
virtual

Get log.

Implements ilog::ILoggable.

virtual bool ilog::CLoggerBase::IsLogConsumed ( const istd::IInformationProvider::InformationCategory categoryPtr = NULL,
const int *  flagsPtr = NULL 
) const
protectedvirtual
virtual bool ilog::CLoggerBase::IsTracingEnabled ( ) const
virtual

Returns true if tracing enabled.

Implements ilog::ILoggable.

bool ilog::CLoggerBase::SendCriticalMessage ( int  id,
const QString &  message,
const QString &  messageSource = QString(),
int  flags = 0 
) const
protected

Send critical message to log.

See Also
istd::IInformationProvider for message meaning documentation.
Parameters
idbinary id identifying this message type for automatic processing.
messagemessage text will be send.
messageSourceoptional human readable description of message source.
bool ilog::CLoggerBase::SendCriticalMessageOnce ( int  id,
const QString &  message,
const QString &  messageSource = QString(),
int  flags = 0 
) const
protected

Send once critical message to log.

Agains to SendCriticalMessage the message will be sent only first time.

See Also
istd::IInformationProvider for message meaning documentation.
Parameters
idbinary id identifying this message type for automatic processing.
messagemessage text will be send.
messageSourceoptional human readable description of message source.
bool ilog::CLoggerBase::SendErrorMessage ( int  id,
const QString &  message,
const QString &  messageSource = QString(),
int  flags = 0 
) const
protected

Send error message to log.

See Also
istd::IInformationProvider for message meaning documentation.
Parameters
idbinary id identifying this message type for automatic processing.
messagemessage text will be send.
messageSourcesource of the message
bool ilog::CLoggerBase::SendErrorMessageOnce ( int  id,
const QString &  message,
const QString &  messageSource = QString(),
int  flags = 0 
) const
protected

Send once error message to log.

Agains to SendErrorMessage the message will be sent only first time.

See Also
istd::IInformationProvider for message meaning documentation.
Parameters
idbinary id identifying this message type for automatic processing.
messagemessage text will be send.
messageSourcesource of the message
bool ilog::CLoggerBase::SendInfoMessage ( int  id,
const QString &  message,
const QString &  messageSource = QString(),
int  flags = 0 
) const
protected

Send info message to log.

See Also
istd::IInformationProvider for message meaning documentation.
Parameters
idbinary id identifying this message type for automatic processing.
messagemessage text will be send.
messageSourcesource of the message
bool ilog::CLoggerBase::SendInfoMessageOnce ( int  id,
const QString &  message,
const QString &  messageSource = QString(),
int  flags = 0 
) const
protected

Send once info message to log.

Agains to SendInfoMessage the message will be sent only first time.

See Also
istd::IInformationProvider for message meaning documentation.
Parameters
idbinary id identifying this message type for automatic processing.
messagemessage text will be send.
messageSourcesource of the message
virtual bool ilog::CLoggerBase::SendLogMessage ( istd::IInformationProvider::InformationCategory  category,
int  id,
const QString &  message,
const QString &  messageSource,
int  flags = 0 
) const
protectedvirtual

Send any message to log.

Default implementation do nothing.

Parameters
categorymessage category.
idbinary id identifying this message type for automatical processing.
messagemessage text will be send.
messageSourcesource of the message.
Returns
true, if it was possible to send this message and it is 'consumed'.

Reimplemented from istd::ILogger.

Referenced by ifile::TXmlFileSerializerComp< ReadArchive, WriteArchive >::ReadArchiveEx::SendLogMessage(), and ifile::TXmlFileSerializerComp< ReadArchive, WriteArchive >::WriteArchiveEx::SendLogMessage().

bool ilog::CLoggerBase::SendUserMessage ( const istd::IInformationProvider messagePtr) const
protected

Send message with user object.

Parameters
messagePtrpointer to user message object. This function overtake ownership to this object.
bool ilog::CLoggerBase::SendWarningMessage ( int  id,
const QString &  message,
const QString &  messageSource = QString(),
int  flags = 0 
) const
protected

Send warning message to log.

See Also
istd::IInformationProvider for message meaning documentation.
Parameters
idbinary id identifying this message type for automatic processing.
messagemessage text will be send.
messageSourcesource of the message
bool ilog::CLoggerBase::SendWarningMessageOnce ( int  id,
const QString &  message,
const QString &  messageSource = QString(),
int  flags = 0 
) const
protected

Send once warning message to log.

Agains to SendWarningMessage the message will be sent only first time.

See Also
istd::IInformationProvider for message meaning documentation.
Parameters
idbinary id identifying this message type for automatic processing.
messagemessage text will be send.
messageSourcesource of the message
virtual void ilog::CLoggerBase::SetLogPtr ( ilog::IMessageConsumer logPtr)
virtual

Install log.

Implements ilog::ILoggable.

virtual void ilog::CLoggerBase::SetTracingEnabled ( bool  trace)
virtual

Enable/disable tracing.

Implements ilog::ILoggable.

Member Data Documentation

QSet<int> ilog::CLoggerBase::m_onceMessageIds
mutableprotected

Definition at line 183 of file CLoggerBase.h.


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy