20 #ifndef __COMMON_ILOGGER_H 21 # define __COMMON_ILOGGER_H 43 typedef void (*
FatalMsgHandler)(QString
const & msg, QString
const & source, QString
const & where);
88 virtual QString defaultSource()
const = 0;
99 virtual void setDefaultSource(QString
const & source) = 0;
105 virtual Severity severity(QString
const & source = 0) = 0;
116 virtual void setSeverity(
Severity severity, QString
const & source = 0) = 0;
122 virtual uint maxSize(QString
const & source = 0) = 0;
136 virtual void setMaxSize(uint maxSize, QString
const & source = 0) = 0;
142 virtual uint maxCount(QString
const & source = 0) = 0;
158 virtual void setMaxCount(uint maxCount, QString
const & source = 0) = 0;
163 virtual Severity consoleSeverity()
const = 0;
172 virtual void setConsoleSeverity(
Severity severity) = 0;
193 virtual void write(
Severity severity, QString
const & msg, QString
const & source = 0, QString
const & where = 0) = 0;
201 virtual QString printf(
char const *
const fmt, ...)
const 203 __attribute__((format(printf, 2, 3)))
217 virtual QString printable(QByteArray
const & msg)
const = 0;
246 void loggerEvent(
Common::iLogger::Severity severity, QString
const & text, QString
const & source, QString
const & where);
259 #define EVAF_FATAL_ERROR(...) \ 261 eVaf::Common::iLogger::instance()->write( \ 262 eVaf::Common::iLogger::Fatal, \ 263 eVaf::Common::iLogger::instance()->printf(__VA_ARGS__), \ 265 eVaf::Common::iLogger::instance()->printf("%s:%s:%d", __FILE__, __FUNCTION__, __LINE__) \ 275 #define EVAF_ERROR(...) \ 277 eVaf::Common::iLogger::instance()->write( \ 278 eVaf::Common::iLogger::Error, \ 279 eVaf::Common::iLogger::instance()->printf(__VA_ARGS__), \ 281 eVaf::Common::iLogger::instance()->printf("%s:%s:%d", __FILE__, __FUNCTION__, __LINE__) \ 291 #define EVAF_WARNING(...) \ 293 eVaf::Common::iLogger::instance()->write( \ 294 eVaf::Common::iLogger::Warning, \ 295 eVaf::Common::iLogger::instance()->printf(__VA_ARGS__), \ 297 eVaf::Common::iLogger::instance()->printf("%s:%s:%d", __FILE__, __FUNCTION__, __LINE__) \ 307 #define EVAF_INFO(...) \ 309 eVaf::Common::iLogger::instance()->write( \ 310 eVaf::Common::iLogger::Info, \ 311 eVaf::Common::iLogger::instance()->printf(__VA_ARGS__), \ 313 eVaf::Common::iLogger::instance()->printf("%s:%s:%d", __FILE__, __FUNCTION__, __LINE__) \ 324 # define EVAF_DEBUG(...) \ 326 eVaf::Common::iLogger::instance()->write( \ 327 eVaf::Common::iLogger::Debug, \ 328 eVaf::Common::iLogger::instance()->printf(__VA_ARGS__), \ 330 eVaf::Common::iLogger::instance()->printf("%s:%s:%d", __FILE__, __FUNCTION__, __LINE__) \ 334 # define EVAF_DEBUG(...) \
General information output by the application or modules.
Fatal error that causes the application to stop functioning.
virtual ~iLogger()
Empty virtual destructor.
Expected issues in the software that will be solved automatically.
Unexpected issues in the software that could be solved automatically.
iLogger()
Interface constructor.
Logger interface for eVaf modules and applications.
Information for debugging purposes.
void(* FatalMsgHandler)(QString const &msg, QString const &source, QString const &where)
Prototype for custom fatal message handler.
Severity
Severity levels for messages indicating the meaning and seriousness of the message.