32 #include <QScopedPointer> 36 #define LOG_MSG_L(level, msg) if(Buteo::Logger::instance()->enabled())(QDebug((QtMsgType)(level)) << __FILE__ << __LINE__ << ":" << msg) 37 #define LOG_MSG_L_PLAIN(level, msg) if(Buteo::Logger::instance()->enabled())(QDebug((QtMsgType)(level)) << msg) 41 #define LOG_FATAL(msg) qFatal(msg) 42 #define LOG_CRITICAL(msg) qCritical() << msg 43 #define LOG_WARNING(msg) qWarning() << msg 46 # define LOG_PROTOCOL(msg) if (Buteo::Logger::instance()->getLogLevel() >= 6) qDebug() << msg 47 # define LOG_INFO(msg) if (Buteo::Logger::instance()->getLogLevel() >= 6) qDebug() << msg 48 # define LOG_DEBUG(msg) if (Buteo::Logger::instance()->getLogLevel() >= 7) qDebug() << msg 49 # define LOG_TRACE(msg) if (Buteo::Logger::instance()->getLogLevel() >= 8) qDebug() << msg 50 # define LOG_TRACE_PLAIN(msg) if (Buteo::Logger::instance()->getLogLevel() >= 8) qDebug() << msg 56 # define FUNCTION_CALL_TRACE QScopedPointer<Buteo::LogTimer> timerDebugVariable; \ 57 if (Buteo::Logger::instance()->getLogLevel() >= 9) \ 58 timerDebugVariable.reset(new Buteo::LogTimer(QString(__PRETTY_FUNCTION__))); 75 LOG_TRACE_PLAIN(iFunc <<
":Entry");
85 LOG_TRACE_PLAIN(iFunc <<
":Exit, execution time:" << iTimer.elapsed()
~LogTimer()
Destructor. Creates an exit message to the log, including function execution time.
Definition: LogMacros.h:83
Definition: AccountsHelper.h:31
Helper class for timing function execution time.
Definition: LogMacros.h:65
LogTimer(const QString &aFunc)
Constructor. Creates an entry message to the log.
Definition: LogMacros.h:73