librsync
2.3.4
|
logging functions. More...
Go to the source code of this file.
Macros | |
#define | FMT_LONG "%"PRIdMAX |
#define | FMT_WEAKSUM "%08"PRIx32 |
#define | FMT_SIZE "%zu" |
#define | rs_trace_enabled() ((rs_trace_level & RS_LOG_PRIMASK) >= RS_LOG_DEBUG) |
Call this before putting too much effort into generating trace messages. More... | |
#define | rs_trace(...) rs_log0(RS_LOG_DEBUG, __func__, __VA_ARGS__) |
#define | rs_log(l, ...) rs_log0((l), __func__, __VA_ARGS__) |
#define | rs_warn(...) rs_log0(RS_LOG_WARNING, __func__, __VA_ARGS__) |
#define | rs_error(...) rs_log0(RS_LOG_ERR, __func__, __VA_ARGS__) |
#define | rs_fatal(...) |
Enumerations | |
enum | { RS_LOG_PRIMASK = 7 , RS_LOG_NONAME = 8 } |
Functions | |
void | rs_log0 (int level, char const *fn, char const *fmt,...) __attribute__((format(printf |
Variables | |
int | rs_trace_level |
logging functions.
trace may be turned off.
error is always on, but you can return and continue in some way.
fatal terminates the whole process.
Definition in file trace.h.
#define rs_trace_enabled | ( | ) | ((rs_trace_level & RS_LOG_PRIMASK) >= RS_LOG_DEBUG) |
#define rs_trace | ( | ... | ) | rs_log0(RS_LOG_DEBUG, __func__, __VA_ARGS__) |
#define rs_log | ( | l, | |
... | |||
) | rs_log0((l), __func__, __VA_ARGS__) |
#define rs_warn | ( | ... | ) | rs_log0(RS_LOG_WARNING, __func__, __VA_ARGS__) |
#define rs_error | ( | ... | ) | rs_log0(RS_LOG_ERR, __func__, __VA_ARGS__) |
#define rs_fatal | ( | ... | ) |
anonymous enum |