From: Cedric Le Goater Date: Tue, 21 Apr 2009 19:51:13 +0000 (+0200) Subject: lxc: cleanup log X-Git-Tag: lxc_0_6_2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcb7355b2fa4bd63c1d015a943b3d54264709083;p=thirdparty%2Flxc.git lxc: cleanup log some headers and macros are now redundant Signed-off-by: Cedric Le Goater Acked-by: Daniel Lezcano Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/console.c b/src/lxc/console.c index 61d4656a0..d8c8a1066 100644 --- a/src/lxc/console.c +++ b/src/lxc/console.c @@ -27,7 +27,6 @@ #include #include -#include "log.h" #include "af_unix.h" #include "error.h" diff --git a/src/lxc/log.c b/src/lxc/log.c index 676e5d3e7..9b7de4ff3 100644 --- a/src/lxc/log.c +++ b/src/lxc/log.c @@ -127,7 +127,3 @@ extern int lxc_log_init(const char *file, int priority, const char *prefix) return 0; } - - -#define MAXTIMELEN 47; -#define ERRNO_FORMAT "%d (%s)" diff --git a/src/lxc/log.h b/src/lxc/log.h index 39005b46a..1e3f5ee16 100644 --- a/src/lxc/log.h +++ b/src/lxc/log.h @@ -244,21 +244,4 @@ extern struct lxc_log_category lxc_log_category_lxc; ERROR("%s - " format "\n", strerror(errno), ##__VA_ARGS__); \ } while (0) - -#define lxc_log(format, level, ...) do { \ - fprintf(stderr, "[%s] \t%s:%d - " format "\n", \ - level, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ - } while (0) - -#define lxc_log_error(format, ...) lxc_log(format, "error", ##__VA_ARGS__); -#define lxc_log_warning(format, ...) lxc_log(format, "warning", ##__VA_ARGS__); -#define lxc_log_info(format, ...) lxc_log(format, "info", ##__VA_ARGS__); -#define lxc_log_debug(format, ...) lxc_log(format, "debug", ##__VA_ARGS__); -#define lxc_log_trace(format, ...) lxc_log(format, "trace", ##__VA_ARGS__); -#define lxc_log_syserror(format, ...) do { \ - fprintf(stderr, "[syserr] \t%s:%d: %s - " format "\n", \ - __FUNCTION__, __LINE__, strerror(errno), \ - ##__VA_ARGS__); \ - } while (0) - #endif diff --git a/src/lxc/parse.c b/src/lxc/parse.c index 2366be9f3..9eafe27f4 100644 --- a/src/lxc/parse.c +++ b/src/lxc/parse.c @@ -27,7 +27,6 @@ #include #include "parse.h" -#include "log.h" #include lxc_log_define(lxc_parse, lxc);