]> git.proxmox.com Git - mirror_lxc.git/blame - src/lxc/log.h
exclude generated tarball from git managed files
[mirror_lxc.git] / src / lxc / log.h
CommitLineData
0ad19a3f 1#ifndef _log_h
2#define _log_h
3
4#define lxc_log(format, level, ...) do { \
5 fprintf(stderr, "[%s] \t%s:%d - " format "\n", \
6 level, __FUNCTION__, __LINE__, ##__VA_ARGS__); \
7 } while (0)
8
9#define lxc_log_error(format, ...) lxc_log(format, "error", ##__VA_ARGS__);
10#define lxc_log_warning(format, ...) lxc_log(format, "warning", ##__VA_ARGS__);
11#define lxc_log_info(format, ...) lxc_log(format, "info", ##__VA_ARGS__);
12#define lxc_log_debug(format, ...) lxc_log(format, "debug", ##__VA_ARGS__);
13#define lxc_log_trace(format, ...) lxc_log(format, "trace", ##__VA_ARGS__);
14#define lxc_log_syserror(format, ...) do { \
15 fprintf(stderr, "[syserr] \t%s:%d: %s - " format "\n", \
16 __FUNCTION__, __LINE__, strerror(errno), \
17 ##__VA_ARGS__); \
18 } while (0)
19
20#endif