i3
|
00001 /* 00002 * vim:ts=4:sw=4:expandtab 00003 * 00004 * i3 - an improved dynamic tiling window manager 00005 * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE) 00006 * 00007 * log.c: Setting of loglevels, logging functions. 00008 * 00009 */ 00010 #ifndef _LOG_H 00011 #define _LOG_H 00012 00013 #include <stdarg.h> 00014 #include <stdbool.h> 00015 00018 #define LOG(fmt, ...) verboselog(fmt, ##__VA_ARGS__) 00019 #define ELOG(fmt, ...) errorlog("ERROR: " fmt, ##__VA_ARGS__) 00020 #define DLOG(fmt, ...) debuglog(LOGLEVEL, "%s:%s:%d - " fmt, __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__) 00021 00022 extern char *loglevels[]; 00023 extern char *errorfilename; 00024 extern char *shmlogname; 00025 extern int shmlog_size; 00026 00032 void init_logging(void); 00033 00038 void add_loglevel(const char *level); 00039 00046 void set_verbosity(bool _verbose); 00047 00053 void debuglog(uint64_t lev, char *fmt, ...); 00054 00059 void errorlog(char *fmt, ...); 00060 00066 void verboselog(char *fmt, ...); 00067 00073 void slog(char *fmt, va_list args); 00074 00075 #endif