diff options
author | José Bollo <jose.bollo@iot.bzh> | 2015-12-03 12:18:13 +0100 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2015-12-03 12:18:13 +0100 |
commit | e3c4a363ea7b03a909f9b92c6657ea9129ee53f3 (patch) | |
tree | b62976ff74cfb609f1a9bfabd04602e0211f59fb /wgtpkg.h | |
parent | 38fbd847bcb58b9067ffe4bd56035ba4ccbf993b (diff) |
Adding verbosity
Change-Id: Icc0fdc6a230e2bf11fccc4f7739009e7266f6b9d
Diffstat (limited to 'wgtpkg.h')
-rw-r--r-- | wgtpkg.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -89,6 +89,15 @@ extern int file_set_prop(struct filedesc *file, const char *name, const char *va extern const char *file_get_prop(struct filedesc *file, const char *name); /**************************************************************/ +/* from wgtpkg-verbose */ +extern int verbosity; +#define warning(...) do{if(verbosity)syslog(LOG_WARNING,__VA_ARGS__);}while(0) +#define notice(...) do{if(verbosity)syslog(LOG_NOTICE,__VA_ARGS__);}while(0) +#define info(...) do{if(verbosity)syslog(LOG_INFO,__VA_ARGS__);}while(0) +#define debug(...) do{if(verbosity>1)syslog(LOG_DEBUG,__VA_ARGS__);}while(0) +extern int verbose_scan_args(int argc, char **argv); + +/**************************************************************/ /* from wgtpkg-workdir */ extern int enter_workdir(int clean); |