mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-29 15:43:56 +00:00
Add WARNF_perror() macro
This commit is contained in:
parent
19dd10b1cc
commit
60d84817bf
5
log.h
5
log.h
@ -105,11 +105,12 @@ void set_log_implementation(void (*log_function)(int level, struct strbuf *buf))
|
||||
#define WHYFNULL(F,...) (LOGF(LOG_LEVEL_ERROR, F, ##__VA_ARGS__), NULL)
|
||||
#define WHYNULL(X) (WHYFNULL("%s", (X)))
|
||||
#define WHYF_perror(F,...) WHYF(F ": %s [errno=%d]", ##__VA_ARGS__, strerror(errno), errno)
|
||||
#define WHY_perror(X) WHYF("%s: %s [errno=%d]", (X), strerror(errno), errno)
|
||||
#define WHY_perror(X) WHYF_perror("%s", (X))
|
||||
|
||||
#define WARNF(F,...) LOGF(LOG_LEVEL_WARN, F, ##__VA_ARGS__)
|
||||
#define WARN(X) WARNF("%s", (X))
|
||||
#define WARN_perror(X) WARNF("%s: %s [errno=%d]", (X), strerror(errno), errno)
|
||||
#define WARNF_perror(F,...) WARNF(F ": %s [errno=%d]", ##__VA_ARGS__, strerror(errno), errno)
|
||||
#define WARN_perror(X) WARNF_perror("%s", (X))
|
||||
#define WHY_argv(X,ARGC,ARGV) logArgv(LOG_LEVEL_ERROR, __HERE__, (X), (ARGC), (ARGV))
|
||||
|
||||
#define INFOF(F,...) LOGF(LOG_LEVEL_INFO, F, ##__VA_ARGS__)
|
||||
|
Loading…
x
Reference in New Issue
Block a user