internal log utility More...
Go to the source code of this file.
Macros | |
#define | zfassert(b) |
same as assert defined for future use | |
#define | ZFASSERT_STATIC(cond, name) |
assert at compile time | |
#define | ZFCoreLogOutputCallbackDefault |
default output callback for ZFCoreLog | |
#define | ZFCoreLog(format, ...) |
log utility used internally | |
#define | ZFCoreLogTrim(format, ...) |
log without header info, see ZFCoreLog | |
#define | ZFCoreLogDetail(callerInfo, format, ...) |
log with custom header info, see ZFCoreLog | |
#define | ZFCoreCriticalErrorPrepare() |
ready to output critical error, see ZFCoreCriticalError | |
#define | ZFCoreCriticalErrorPrepareDetail(callerInfo) |
see ZFCoreCriticalErrorPrepare | |
#define | ZFCoreCriticalError() |
used when error occurred, to terminate the application | |
#define | ZFCoreCriticalErrorDetail(callerInfo) |
see ZFCoreCriticalError | |
Typedefs | |
typedef void(* | ZFCoreLogOutputCallbackType) (const zfchar *s) |
output callback for ZFCoreLog | |
typedef void(* | ZFCoreCriticalErrorCallback) (const ZFCallerInfo &callerInfo) |
callback which would be called if ZFCoreCriticalError is called | |
Functions | |
void | ZFCoreLogOutputCallback (ZFCoreLogOutputCallbackType callback) |
set the output callback for ZFCoreLog | |
ZFCoreLogOutputCallbackType | ZFCoreLogOutputCallback (void) |
get the output callback for ZFCoreLog | |
void | ZFCoreCriticalErrorPrepareCallbackAdd (ZFCoreCriticalErrorCallback callback) |
see ZFCoreCriticalErrorCallback | |
void | ZFCoreCriticalErrorPrepareCallbackRemove (ZFCoreCriticalErrorCallback callback) |
see ZFCoreCriticalErrorCallback | |
void | ZFCoreCriticalErrorCallbackAdd (ZFCoreCriticalErrorCallback callback) |
see ZFCoreCriticalErrorCallback | |
void | ZFCoreCriticalErrorCallbackRemove (ZFCoreCriticalErrorCallback callback) |
see ZFCoreCriticalErrorCallback | |
internal log utility
used internally, you should use ZFLog instead
#define zfassert | ( | b | ) |
#define ZFCoreLog | ( | format, | |
... ) |
log utility used internally
quite similar to printf, except that this function would automatically add header info to head, which includes file name, function name and file line info, and an extra '\n' to tail
for all the format supported, please refer to zfstringAppend
#define ZFCoreCriticalErrorPrepare | ( | ) |
ready to output critical error, see ZFCoreCriticalError
usage:
this is useful to redirect ZFCoreLog by ZFCoreLogOutputCallback, to save critical error messages to proper location
#define ZFCoreCriticalError | ( | ) |
used when error occurred, to terminate the application
|
extern |
set the output callback for ZFCoreLog