ZFFramework
|
thread-safe log utility More...
Go to the source code of this file.
Classes | |
class | ZFLogFormat |
output format for zfLog More... | |
Macros | |
#define | ZFLOG_HEADER_STRING |
a convenient debug header string | |
#define | zfLog(...) |
thread-safe log utility | |
#define | zfLogTrim(...) |
see zfLog | |
Functions | |
ZFMutex * | ZFLogMutex () |
mutex used by zfLog, you may use this lock to prevent your log actions from being interrupted | |
void | ZFLogFormatDefault (ZFLogFormat *fmt) |
change default log format | |
ZFLogFormat * | ZFLogFormatDefault () |
get default log format | |
zfstring | zfLogCurTimeString () |
get a string contains current time with format HH:mm:ss.SSS | |
thread-safe log utility
#define ZFLOG_HEADER_STRING |
a convenient debug header string
typically looks like this (not ensured):
"timestamp [file scope::function (line)] "
#define zfLog | ( | ... | ) |
thread-safe log utility
typical usage:
ZFLog is actually an output callback, you can output anything that ZFOutput supported
final log content would be written to ZFOutputDefault, which can be easily redirected to other output destinations
ZFLog is thread-safe, implemented by ZFLogMutex
by default, ZFLog would automatically:
these behavior can be changed by:
and they would be reset to default state after each zfLog call
|
extern |
mutex used by zfLog, you may use this lock to prevent your log actions from being interrupted
note, the mutex would be initialized only after ZFLevelZFFrameworkEssential