diff options
author | Stefano Stabellini <sstabellini@xensource.com> | 2010-07-16 12:10:56 +0100 |
---|---|---|
committer | Stefano Stabellini <sstabellini@xensource.com> | 2010-07-16 12:10:56 +0100 |
commit | 7255b375dfb88f74d70ce0b16d1c33a71199bf43 (patch) | |
tree | f0e0ef65fdca9c1c1b130db0c15824a73be3393c | |
parent | 8dda1f560d36c4ce2d91b6514d830e4280748226 (diff) | |
download | xen-7255b375dfb88f74d70ce0b16d1c33a71199bf43.tar.gz xen-7255b375dfb88f74d70ce0b16d1c33a71199bf43.tar.bz2 xen-7255b375dfb88f74d70ce0b16d1c33a71199bf43.zip |
Before this patch only log messages with precisely priority
LOG_WARNING (or precisely LOG_DEBUG if -v) would be logged.
xenconsoled only actually logs using LOG_ERR and LOG_DEBUG so for the
most part we would have been logging absolutely nothing up until now.
Linux provides a LOG_UPTO macro but I'm not sure how portable that is
so I have opencoded the list of levels.
Do I get some sort of prize for fixing a bug introduced in 2005?
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
-rw-r--r-- | tools/console/daemon/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/console/daemon/main.c b/tools/console/daemon/main.c index 60faa4bb2a..789baa6c23 100644 --- a/tools/console/daemon/main.c +++ b/tools/console/daemon/main.c @@ -73,7 +73,8 @@ int main(int argc, char **argv) bool is_interactive = false; int ch; int syslog_option = LOG_CONS; - int syslog_mask = LOG_WARNING; + int syslog_mask = LOG_MASK(LOG_WARNING)|LOG_MASK(LOG_ERR)|LOG_MASK(LOG_CRIT)|\ + LOG_MASK(LOG_ALERT)|LOG_MASK(LOG_EMERG); int opt_ind = 0; char *pidfile = NULL; @@ -89,7 +90,8 @@ int main(int argc, char **argv) #ifndef __sun__ syslog_option |= LOG_PERROR; #endif - syslog_mask = LOG_DEBUG; + syslog_mask |= LOG_MASK(LOG_NOTICE)|LOG_MASK(LOG_INFO)| \ + LOG_MASK(LOG_DEBUG); break; case 'i': is_interactive = true; |