16 #define VERBOSE_LEVEL_NONE (gVerboseMask == 0) 17 #define VERBOSE_LEVEL_CHECK(_MASK_, _LEVEL_) \ 18 (((gVerboseMask & (_MASK_)) == (_MASK_)) && gLogLevel >= (_LEVEL_)) 20 #define LOG(_MASK_, _LEVEL_, _STRING_) \ 22 if (VERBOSE_LEVEL_CHECK((_MASK_), (_LEVEL_)) && ((_LEVEL_)>=0)) \ 24 PrintLogLine(_MASK_, (LogLevel)_LEVEL_, \ 25 __FILE__, __LINE__, __FUNCTION__, \ 26 _STRING_.toLocal8Bit().constData()); \ 30 void PrintLogLine(uint64_t mask, LogLevel level,
const char *file,
int line,
31 const char *
function,
const char *format, ...);
40 void StartLogging(
const QString &Logfile,
int progress = 0,
41 int quiet = 0,
const QString &level = QStringLiteral(
"info"),
42 bool Propagate =
false);
56 #define ENO (QString("\n\t\t\teno: ") + LogErrorToString(errno)) 57 #define ENO_STR ENO.toLocal8Bit().constData()
QString gLogPropagationArgs
int ParseVerboseArgument(const QString &arg)
QString LogErrorToString(int errnum)
bool GetQuietLogPropagation(void)
void PrintLogLine(uint64_t mask, LogLevel level, const char *file, int line, const char *function, const char *format,...)
LogLevel GetLogLevel(const QString &level)
QString GetLogLevelName(LogLevel level)
void StartLogging(const QString &Logfile, int progress=0, int quiet=0, const QString &level=QStringLiteral("info"), bool Propagate=false)
void CalculateLogPropagation(void)