Commit 8d041f50 by dlezcano

Renamed lxc_log

parent 0802a288
#include <stdio.h>
#include <errno.h>
#include <stdarg.h>
#include <log.h>
#define MAXTIMELEN 47;
#define ERRNO_FORMAT "%d (%s)"
#ifndef _log_h
#define _log_h
#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, "[SYSERROR][%s] \t%s:%d - " format "\n", \
strerror(errno),__FUNCTION__, __LINE__, \
##__VA_ARGS__); \
} while (0)
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment