libi3: Introduce LOG

This commit is contained in:
Quentin Glidic
2012-08-12 12:20:15 +02:00
parent 6ff3f7abad
commit 9f7247fd9c
2 changed files with 11 additions and 5 deletions

View File

@ -68,8 +68,11 @@ struct Font {
/* Since this file also gets included by utilities which dont use the i3 log
* infrastructure, we define a fallback. */
#if !defined(LOG)
#define LOG(fmt, ...) fprintf(stdout, "[libi3] " __FILE__ " " fmt, ##__VA_ARGS__)
#endif
#if !defined(ELOG)
#define ELOG(fmt, ...) fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__)
#define ELOG(fmt, ...) fprintf(stderr, "[libi3] ERROR: " fmt, ##__VA_ARGS__)
#endif
/**