![]() |
ICF 3.1.1.10
Technical documentation of ICF Libraries
|
Base class implementing interface istd::ILogger sending log messages over ilog::IMessageConsumer. More...
#include <CLoggerBase.h>
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 |
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.
| ilog::CLoggerBase::CLoggerBase | ( | ) |
|
protected |
Reset message lock.
Enable message to be send again. Agains to SendXXXlMessageOnce for id will be sent once again.
| id | binary id identifying this message type for automatic processing. |
|
overrideprotectedvirtual |
Decorate message parts before outputting.
Reimplemented from istd::ILogger.
Reimplemented in ilog::TLoggerCompWrap< Base >, ilog::TLoggerCompWrap< CFileTypeInfoComp >, ilog::TLoggerCompWrap< CInstantiatorComp >, and ilog::TLoggerCompWrap< ifile::CRelativeFileNameParamComp >.
Referenced by ifile::TFileSerializerComp< ReadArchive, WriteArchive >::ReadArchiveEx::SendLogMessage(), ifile::TFileSerializerComp< ReadArchive, WriteArchive >::WriteArchiveEx::SendLogMessage(), ifile::TXmlFileSerializerComp< ReadArchive, WriteArchive >::ReadArchiveEx::SendLogMessage(), and ifile::TXmlFileSerializerComp< ReadArchive, WriteArchive >::WriteArchiveEx::SendLogMessage().
|
overridevirtual |
Get log.
Implements ilog::ILoggable.
| const QByteArray & ilog::CLoggerBase::GetVerboseSenderId | ( | ) | const |
Get sender ID for verbose messages.
|
overrideprotectedvirtual |
Check if any log message is consumed.
Default implementation retuns false.
Reimplemented from istd::ILogger.
Referenced by ifile::TXmlFileSerializerComp< ReadArchive, WriteArchive >::ReadArchiveEx::IsLogConsumed(), and ifile::TXmlFileSerializerComp< ReadArchive, WriteArchive >::WriteArchiveEx::IsLogConsumed().
|
protected |
Check if verbose messages are enabled.
|
protected |
Send critical message to log.
| id | binary id identifying this message type for automatic processing. |
| message | message text will be send. |
| messageSource | optional human readable description of message source. |
|
protected |
Send once critical message to log.
Agains to SendCriticalMessage the message will be sent only first time.
| id | binary id identifying this message type for automatic processing. |
| message | message text will be send. |
| messageSource | optional human readable description of message source. |
|
protected |
Send error message to log.
| id | binary id identifying this message type for automatic processing. |
| message | message text will be send. |
| messageSource | source of the message |
|
protected |
Send once error message to log.
Agains to SendErrorMessage the message will be sent only first time.
| id | binary id identifying this message type for automatic processing. |
| message | message text will be send. |
| messageSource | source of the message |
|
protected |
Send info message to log.
| id | binary id identifying this message type for automatic processing. |
| message | message text will be send. |
| messageSource | source of the message |
|
protected |
Send once info message to log.
Agains to SendInfoMessage the message will be sent only first time.
| id | binary id identifying this message type for automatic processing. |
| message | message text will be send. |
| messageSource | source of the message |
|
overrideprotectedvirtual |
Send any message to log.
Default implementation do nothing.
| category | message category. |
| id | binary id identifying this message type for automatical processing. |
| message | message text will be send. |
| messageSource | source of the message. |
Reimplemented from istd::ILogger.
Referenced by ifile::TXmlFileSerializerComp< ReadArchive, WriteArchive >::ReadArchiveEx::SendLogMessage(), and ifile::TXmlFileSerializerComp< ReadArchive, WriteArchive >::WriteArchiveEx::SendLogMessage().
|
protected |
Send message with user object.
| messagePtr | pointer to user message object. This function overtake ownership to this object. |
|
protected |
Send verbose message.
If verbose messages are not enabled, the function does nothing.
|
protected |
Send warning message to log.
| id | binary id identifying this message type for automatic processing. |
| message | message text will be send. |
| messageSource | source of the message |
|
protected |
Send once warning message to log.
Agains to SendWarningMessage the message will be sent only first time.
| id | binary id identifying this message type for automatic processing. |
| message | message text will be send. |
| messageSource | source of the message |
|
overridevirtual |
Install log.
Implements ilog::ILoggable.
| void ilog::CLoggerBase::SetVerboseSenderId | ( | const QByteArray & | id | ) |
Set sender ID for verbose messages.
If it is not set, no verbose messages will be sent.
|
mutableprotected |
Definition at line 199 of file CLoggerBase.h.
© Witold Gantzke and Kirill Lepskiy