![]() |
Functions | |
Q_LOG * | qLog (const char *filepathfmt, mode_t mode, int rotateinterval, bool flush) |
Open ratating-log file. | |
static bool | _write (Q_LOG *log, const char *str) |
Q_LOG->write(): Log messages. | |
static bool | _writef (Q_LOG *log, const char *format,...) |
Q_LOG->writef(): Log messages. | |
static bool | _duplicate (Q_LOG *log, FILE *outfp, bool flush) |
Q_LOG->duplicate(): Duplicate log string into other stream. | |
static bool | _flush (Q_LOG *log) |
Q_LOG->flush(): Flush buffered log. | |
static bool | _free (Q_LOG *log) |
Q_LOG->free(): Close ratating-log file & de-allocate resources. |
Q_LOG* qLog | ( | const char * | filepathfmt, | |
mode_t | mode, | |||
int | rotateinterval, | |||
bool | flush | |||
) |
Open ratating-log file.
filepathfmt | filename format. formatting argument is same as strftime() | |
mode | new file mode. 0 for system default | |
rotateinterval | rotating interval seconds, set 0 to disable rotation | |
flush | set to true if you want to flush everytime logging. false for buffered logging |
static bool _write | ( | Q_LOG * | log, | |
const char * | str | |||
) | [static] |
Q_LOG->write(): Log messages.
log | a pointer of Q_LOG | |
str | message string |
static bool _writef | ( | Q_LOG * | log, | |
const char * | format, | |||
... | ||||
) | [static] |
Q_LOG->writef(): Log messages.
log | a pointer of Q_LOG | |
format | messages format |
static bool _duplicate | ( | Q_LOG * | log, | |
FILE * | outfp, | |||
bool | flush | |||
) | [static] |
Q_LOG->duplicate(): Duplicate log string into other stream.
log | a pointer of Q_LOG | |
fp | logging messages will be printed out into this stream. set NULL to disable. | |
flush | set to true if you want to flush everytime duplicating. |
static bool _flush | ( | Q_LOG * | log | ) | [static] |
Q_LOG->flush(): Flush buffered log.
log | a pointer of Q_LOG |
static bool _free | ( | Q_LOG * | log | ) | [static] |
Q_LOG->free(): Close ratating-log file & de-allocate resources.
log | a pointer of Q_LOG |