From: Christian Brauner Date: Sat, 7 Dec 2019 16:21:18 +0000 (+0100) Subject: log: rearrange X-Git-Tag: lxc-4.0.0~78^2~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b0c584613bcc75c25f0491c4622fa9169196959;p=thirdparty%2Flxc.git log: rearrange Signed-off-by: Christian Brauner --- diff --git a/src/lxc/log.h b/src/lxc/log.h index 951eaba31..553bc2a12 100644 --- a/src/lxc/log.h +++ b/src/lxc/log.h @@ -491,12 +491,6 @@ ATTR_UNUSED static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \ -1; \ }) -#define log_trace(__ret__, format, ...) \ - ({ \ - TRACE(format, ##__VA_ARGS__); \ - __ret__; \ - }) - #define log_error_errno(__ret__, __errno__, format, ...) \ ({ \ errno = __errno__; \ @@ -510,6 +504,19 @@ ATTR_UNUSED static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \ __ret__; \ }) +#define log_trace_errno(__ret__, __errno__, format, ...) \ + ({ \ + errno = __errno__; \ + SYSTRACE(format, ##__VA_ARGS__); \ + __ret__; \ + }) + +#define log_trace(__ret__, format, ...) \ + ({ \ + TRACE(format, ##__VA_ARGS__); \ + __ret__; \ + }) + #define log_warn_errno(__ret__, __errno__, format, ...) \ ({ \ errno = __errno__; \ @@ -517,18 +524,19 @@ ATTR_UNUSED static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \ __ret__; \ }) -#define log_debug(__ret__, format, ...) \ - ({ \ - DEBUG(format, ##__VA_ARGS__); \ - __ret__; \ - }) - #define log_debug_errno(__ret__, __errno__, format, ...) \ ({ \ + errno = __errno__; \ SYSDEBUG(format, ##__VA_ARGS__); \ __ret__; \ }) +#define log_debug(__ret__, format, ...) \ + ({ \ + DEBUG(format, ##__VA_ARGS__); \ + __ret__; \ + }) + extern int lxc_log_fd; extern int lxc_log_syslog(int facility);