#include <stdint.h>
#include <errno.h>
#include "torcloggingdefs.h"
Go to the source code of this file.
|
void | PrintLogLine (uint64_t mask, LogLevel level, const char *file, int line, const char *function, const char *format,...) |
|
void | StartLogging (const QString &Logfile, int progress=0, int quiet=0, const QString &level=QStringLiteral("info"), bool Propagate=false) |
|
void | StopLogging (void) |
|
void | CalculateLogPropagation (void) |
|
bool | GetQuietLogPropagation (void) |
|
LogLevel | GetLogLevel (const QString &level) |
|
QString | GetLogLevelName (LogLevel level) |
|
int | ParseVerboseArgument (const QString &arg) |
|
QString | LogErrorToString (int errnum) |
|
#define ENO (QString("\n\t\t\teno: ") + LogErrorToString(errno)) |
This can be appended to the LOG args with "+". Please do not use "<<". It uses a thread safe version of strerror to produce the string representation of errno and puts it on the next line in the verbose output.
Definition at line 56 of file torclogging.h.
#define ENO_STR ENO.toLocal8Bit().constData() |
#define LOG |
( |
|
_MASK_, |
|
|
|
_LEVEL_, |
|
|
|
_STRING_ |
|
) |
| |
Value:do { \
__FILE__, __LINE__, __FUNCTION__, \
_STRING_.toLocal8Bit().constData()); \
} \
} while (false)
void PrintLogLine(uint64_t mask, LogLevel level, const char *file, int line, const char *function, const char *format,...)
#define VERBOSE_LEVEL_CHECK(_MASK_, _LEVEL_)
Definition at line 20 of file torclogging.h.
#define VERBOSE_LEVEL_CHECK |
( |
|
_MASK_, |
|
|
|
_LEVEL_ |
|
) |
| (((gVerboseMask & (_MASK_)) == (_MASK_)) && gLogLevel >= (_LEVEL_)) |
void CalculateLogPropagation |
( |
void |
| ) |
|
LogLevel GetLogLevel |
( |
const QString & |
level | ) |
|
QString GetLogLevelName |
( |
LogLevel |
level | ) |
|
bool GetQuietLogPropagation |
( |
void |
| ) |
|
QString LogErrorToString |
( |
int |
errnum | ) |
|
int ParseVerboseArgument |
( |
const QString & |
arg | ) |
|
void PrintLogLine |
( |
uint64_t |
mask, |
|
|
LogLevel |
level, |
|
|
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
function, |
|
|
const char * |
format, |
|
|
|
... |
|
) |
| |
void StartLogging |
( |
const QString & |
Logfile, |
|
|
int |
progress = 0 , |
|
|
int |
quiet = 0 , |
|
|
const QString & |
level = QStringLiteral("info") , |
|
|
bool |
Propagate = false |
|
) |
| |
void StopLogging |
( |
void |
| ) |
|
QString gLogPropagationArgs |