summaryrefslogtreecommitdiffstats
path: root/src/verbose.h
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2015-12-15 16:22:32 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2015-12-15 16:22:32 +0100
commit41e3ea4dbae634ca13941d134e990d953b741c4b (patch)
tree96b3e921cbf802605bb7ec50dc6ee69241abdaa1 /src/verbose.h
parent32c6eecb9955e94b4d68efc09912efe88140ce83 (diff)
work in progress
Change-Id: Ifa4371f99968a56e980396f7009ab5030b831ebb
Diffstat (limited to 'src/verbose.h')
-rw-r--r--src/verbose.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/verbose.h b/src/verbose.h
index 8103539..082a9b1 100644
--- a/src/verbose.h
+++ b/src/verbose.h
@@ -17,6 +17,8 @@
#if !defined(NDEBUG)
#include <syslog.h>
extern int verbosity;
+#define LOGUSER(app) openlog(app,LOG_PERROR,LOG_USER)
+#define LOGAUTH(app) openlog(app,LOG_PERROR,LOG_AUTH)
#define ERROR(...) syslog(LOG_ERR,__VA_ARGS__)
#define WARNING(...) do{if(verbosity)syslog(LOG_WARNING,__VA_ARGS__);}while(0)
#define NOTICE(...) do{if(verbosity)syslog(LOG_NOTICE,__VA_ARGS__);}while(0)
@@ -24,6 +26,8 @@ extern int verbosity;
#define DEBUG(...) do{if(verbosity>1)syslog(LOG_DEBUG,__VA_ARGS__);}while(0)
#else
#include <syslog.h>
+#define LOGUSER(app) openlog(app,LOG_PERROR,LOG_USER)
+#define LOGAUTH(app) openlog(app,LOG_PERROR,LOG_AUTH)
extern void verbose_error(const char *file, int line);
#define ERROR(...) verbose_error(__FILE__,__LINE__)
#define WARNING(...) do{/*nothing*/}while(0)