20 #ifndef __COMMON_LOGGER_H 21 #define __COMMON_LOGGER_H 28 #include <QExplicitlySharedDataPointer> 29 #include <QSharedData> 39 void defFatalMsgHandler(QString
const & msg, QString
const & source, QString
const & where);
84 void init(QString
const & source);
126 void writeToLogFile(
LoggerSource const & src, QString
const & msg);
155 virtual QString defaultSource()
const;
157 virtual void setDefaultSource(QString
const & source);
161 virtual void setSeverity(
iLogger::Severity severity, QString
const & source = 0);
163 virtual uint
maxSize(QString
const & source = 0);
165 virtual void setMaxSize(uint maxSize, QString
const & source = 0);
167 virtual uint
maxCount(QString
const & source = 0);
169 virtual void setMaxCount(uint maxCount, QString
const & source = 0);
175 virtual void write(
Severity severity, QString
const & msg, QString
const & source = 0, QString
const & where = 0);
177 virtual QString printf(
char const *
const fmt, ...)
const;
179 virtual QString printable(QByteArray
const & msg)
const;
186 void writeToLogFile(
LoggerSource const & src, QString
const & msg);
201 QExplicitlySharedDataPointer<LoggerSource> mDefaultSource;
204 QHash<QString, QExplicitlySharedDataPointer<LoggerSource> > mSources;
219 void setColor(
short int c);
uint maxCount
Current maximum number of log files.
iLogger::Severity severity
Current severity level.
virtual iLogger::Severity consoleSeverity() const
Returns the current console severity level.
Worker class for the logger.
iLogger interface implementation.
Logger interface for eVaf modules and applications.
QString fileName
File name.
uint maxSize
Current maximum size of log files.
void defFatalMsgHandler(QString const &msg, QString const &source, QString const &where)
Default fatal error message handler.
void(* FatalMsgHandler)(QString const &msg, QString const &source, QString const &where)
Prototype for custom fatal message handler.
QString name
Name of the source.
Logger interface for eVaf.
void init(QString const &source)
Initializes the source.
Severity
Severity levels for messages indicating the meaning and seriousness of the message.