cleanup logging, need to be careful with SECURE and DEBUG

git-svn-id: https://svn.musicpd.org/mpd/trunk@58 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes
2004-02-25 19:13:10 +00:00
parent 483d8873bd
commit e1c839cd56
3 changed files with 26 additions and 18 deletions
+6 -12
View File
@@ -27,22 +27,16 @@
extern int logLevel;
#define ERROR(x, arg...) do { \
myfprintf(stderr, x , ##arg); \
} while(0);
#define ERROR(x, arg...) myfprintf(stderr, x , ##arg)
#define LOG(x, arg...) do { \
myfprintf(stdout, x , ##arg); \
} while(0);
#define LOG(x, arg...) myfprintf(stdout, x , ##arg)
#define SECURE(x, arg...) do { \
if(logLevel>=LOG_LEVEL_SECURE) myfprintf(stdout, x , ##arg); \
} while(0);
#define SECURE(x, arg...) if(logLevel>=LOG_LEVEL_SECURE) \
myfprintf(stdout, x , ##arg)
#define DEBUG(x, arg...) do { \
if(logLevel>=LOG_LEVEL_DEBUG) myfprintf(stdout, x , ##arg); \
} while(0);
#define DEBUG(x, arg...) if(logLevel>=LOG_LEVEL_DEBUG) \
myfprintf(stdout, x , ##arg)
void initLog();