lxc: cleanup log

some headers and macros are now redundant

Signed-off-by: Cedric Le Goater <legoater@free.fr>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
Cedric Le Goater 2009-04-21 21:51:13 +02:00 committed by Daniel Lezcano
parent 36eb9bdef1
commit dcb7355b2f
4 changed files with 0 additions and 23 deletions

View File

@ -27,7 +27,6 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/un.h> #include <sys/un.h>
#include "log.h"
#include "af_unix.h" #include "af_unix.h"
#include "error.h" #include "error.h"

View File

@ -127,7 +127,3 @@ extern int lxc_log_init(const char *file, int priority, const char *prefix)
return 0; return 0;
} }
#define MAXTIMELEN 47;
#define ERRNO_FORMAT "%d (%s)"

View File

@ -244,21 +244,4 @@ extern struct lxc_log_category lxc_log_category_lxc;
ERROR("%s - " format "\n", strerror(errno), ##__VA_ARGS__); \ ERROR("%s - " format "\n", strerror(errno), ##__VA_ARGS__); \
} while (0) } 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 #endif

View File

@ -27,7 +27,6 @@
#include <dirent.h> #include <dirent.h>
#include "parse.h" #include "parse.h"
#include "log.h"
#include <lxc/log.h> #include <lxc/log.h>
lxc_log_define(lxc_parse, lxc); lxc_log_define(lxc_parse, lxc);