ICF 3.1.1.10
Technical documentation of ICF Libraries
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:
Collaboration diagram for ilog::CLoggerBase:

Public Member Functions

 CLoggerBase ()
 
const QByteArray & GetVerboseSenderId () const
 Get sender ID for verbose messages.
 
void SetVerboseSenderId (const QByteArray &id)
 Set sender ID for verbose messages.
 
void SetLogPtr (ilog::IMessageConsumer *logPtr) override
 Install log.
 
ilog::IMessageConsumer * GetLogPtr () const override
 Get log.
 
- Public Member Functions inherited from ilog::ILoggable

Protected Member Functions

bool IsVerboseEnabled () const
 Check if verbose messages are enabled.
 
bool SendVerboseMessage (const QString &message, const QString &messageSource=QString()) const
 Send verbose message.
 
bool SendInfoMessage (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send info message to log.
 
bool SendWarningMessage (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send warning message to log.
 
bool SendErrorMessage (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send error message to log.
 
bool SendCriticalMessage (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send critical message to log.
 
bool SendInfoMessageOnce (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send once info message to log.
 
bool SendWarningMessageOnce (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send once warning message to log.
 
bool SendErrorMessageOnce (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send once error message to log.
 
bool SendCriticalMessageOnce (int id, const QString &message, const QString &messageSource=QString(), int flags=0) const
 Send once critical message to log.
 
bool SendUserMessage (const istd::IInformationProvider *messagePtr) const
 Send message with user object.
 
bool AllowMessageOnceAgain (int id)
 Reset message lock.
 
bool IsLogConsumed (const istd::IInformationProvider::InformationCategory *categoryPtr=nullptr, const int *flagsPtr=nullptr) const override
 Check if any log message is consumed.
 
bool SendLogMessage (istd::IInformationProvider::InformationCategory category, int id, const QString &message, const QString &messageSource, int flags=0) const override
 Send any message to log.
 
void DecorateMessage (istd::IInformationProvider::InformationCategory category, int id, int flags, QString &message, QString &messageSource) const override
 Decorate message parts before outputting.
 
- Protected Member Functions inherited from istd::ILogger

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 27 of file CLoggerBase.h.

Constructor & Destructor Documentation

◆ CLoggerBase()

ilog::CLoggerBase::CLoggerBase ( )

Member Function Documentation

◆ AllowMessageOnceAgain()

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.

◆ DecorateMessage()

◆ GetLogPtr()

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

Get log.

Implements ilog::ILoggable.

◆ GetVerboseSenderId()

const QByteArray & ilog::CLoggerBase::GetVerboseSenderId ( ) const

Get sender ID for verbose messages.

◆ IsLogConsumed()

bool ilog::CLoggerBase::IsLogConsumed ( const istd::IInformationProvider::InformationCategory * categoryPtr = nullptr,
const int * flagsPtr = nullptr ) const
overrideprotectedvirtual

◆ IsVerboseEnabled()

bool ilog::CLoggerBase::IsVerboseEnabled ( ) const
protected

Check if verbose messages are enabled.

◆ SendCriticalMessage()

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.

◆ SendCriticalMessageOnce()

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.

◆ SendErrorMessage()

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

◆ SendErrorMessageOnce()

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

◆ SendInfoMessage()

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

◆ SendInfoMessageOnce()

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

◆ SendLogMessage()

bool ilog::CLoggerBase::SendLogMessage ( istd::IInformationProvider::InformationCategory category,
int id,
const QString & message,
const QString & messageSource,
int flags = 0 ) const
overrideprotectedvirtual

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().

◆ SendUserMessage()

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.

◆ SendVerboseMessage()

bool ilog::CLoggerBase::SendVerboseMessage ( const QString & message,
const QString & messageSource = QString() ) const
protected

Send verbose message.

If verbose messages are not enabled, the function does nothing.

◆ SendWarningMessage()

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

◆ SendWarningMessageOnce()

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

◆ SetLogPtr()

void ilog::CLoggerBase::SetLogPtr ( ilog::IMessageConsumer * logPtr)
overridevirtual

Install log.

Implements ilog::ILoggable.

◆ SetVerboseSenderId()

void ilog::CLoggerBase::SetVerboseSenderId ( const QByteArray & id)

Set sender ID for verbose messages.

If it is not set, no verbose messages will be sent.

Member Data Documentation

◆ m_onceMessageIds

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

Definition at line 199 of file CLoggerBase.h.


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

© Witold Gantzke and Kirill Lepskiy