Go to the documentation of this file.
14 const char *
file,
int line,
39 #define LOG(_MASK_, _LEVEL_, _QSTRING_) \
41 if (VERBOSE_LEVEL_CHECK((_MASK_), (_LEVEL_)) && ((_LEVEL_)>=0)) \
43 LogPrintLine(_MASK_, _LEVEL_, \
44 __FILE__, __LINE__, __FUNCTION__, \
53 int facility = 0, LogLevel_t level = LOG_INFO,
54 bool propagate =
false,
56 bool testHarness =
false);
74 #define ENO (QString("\n\t\t\teno: ") + logStrerror(errno))
75 #define ENO_STR ENO.toLocal8Bit().constData()
79 return QStringLiteral(
"0x%1").arg(
reinterpret_cast<quintptr
>(
p),
80 sizeof(
void*) * 2, 16, QChar(
'0'));
MBASE_PUBLIC void resetLogging(void)
Intended for use only by the test harness.
MBASE_PUBLIC QString verboseString
QString pointerToQString(const void *p)
MBASE_PUBLIC void logStart(const QString &logfile, bool progress=false, int quiet=0, int facility=0, LogLevel_t level=LOG_INFO, bool propagate=false, bool loglong=false, bool testHarness=false)
Entry point to start logging for the application.
static bool VERBOSE_LEVEL_CHECK(uint64_t mask, LogLevel_t level)
MBASE_PUBLIC QString logLevelGetName(LogLevel_t level)
Map a log level enumerated value back to the name.
MBASE_PUBLIC void LogPrintLine(uint64_t mask, LogLevel_t level, const char *file, int line, const char *function, QString message)
Format and send a log message into the queue.
MBASE_PUBLIC void logStop(void)
Entry point for stopping logging for an application.
MBASE_PUBLIC QStringList logPropagateArgList
MBASE_PUBLIC QString logPropagateArgs
MBASE_PUBLIC ComponentLogLevelMap componentLogLevel
MBASE_PUBLIC bool logPropagateQuiet(void)
Check if we are propagating a "--quiet".
MBASE_PUBLIC LogLevel_t logLevelGet(const QString &level)
Map a log level name back to the enumerated value.
MBASE_PUBLIC LogLevel_t logLevel
MBASE_PUBLIC QString logStrerror(int errnum)
Verbose helper function for ENO macro.
QMap< uint64_t, LogLevel_t > ComponentLogLevelMap
MBASE_PUBLIC int syslogGetFacility(const QString &facility)
static bool VERBOSE_LEVEL_NONE()
MBASE_PUBLIC uint64_t verboseMask
MBASE_PUBLIC void logPropagateCalc(void)
Generate the logPropagateArgs global with the latest logging level, mask, etc to propagate to all of ...
MBASE_PUBLIC int verboseArgParse(const QString &arg)
Parse the –verbose commandline argument and set the verbose level.