i3
|
00001 /* 00002 * vim:ts=8:expandtab 00003 * 00004 * i3 - an improved dynamic tiling window manager 00005 * 00006 * © 2009-2010 Michael Stapelberg and contributors 00007 * 00008 * See file LICENSE for license information. 00009 * 00010 */ 00011 #ifndef _LOG_H 00012 #define _LOG_H 00013 00014 #include <stdarg.h> 00015 #include <stdbool.h> 00016 00019 #define LOG(fmt, ...) verboselog(fmt, ##__VA_ARGS__) 00020 #define ELOG(fmt, ...) errorlog("ERROR: " fmt, ##__VA_ARGS__) 00021 #define DLOG(fmt, ...) debuglog(LOGLEVEL, "%s:%s:%d - " fmt, __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__) 00022 00023 extern char *loglevels[]; 00024 00029 void add_loglevel(const char *level); 00030 00037 void set_verbosity(bool _verbose); 00038 00044 void debuglog(int lev, char *fmt, ...); 00045 00050 void errorlog(char *fmt, ...); 00051 00057 void verboselog(char *fmt, ...); 00058 00064 void slog(char *fmt, va_list args); 00065 00066 #endif