WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-4.0-testing] Before this patch only log messages wi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] Before this patch only log messages with precisely priority
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 02 Aug 2010 03:25:15 -0700
Delivery-date: Mon, 02 Aug 2010 03:25:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1280744164 -3600
# Node ID 296b08b02fc8bd05db80dc778ff73ca5b4dd121a
# Parent  73a9e51a1f2657f6a53bdc6451bc086dae6eedf5
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@xxxxxxxxxx>
xen-unstable changeset:   21814:91ce0b0953ca
xen-unstable date:        Fri Jul 16 12:10:56 2010 +0100
---
 tools/console/daemon/main.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -r 73a9e51a1f26 -r 296b08b02fc8 tools/console/daemon/main.c
--- a/tools/console/daemon/main.c       Mon Aug 02 11:15:30 2010 +0100
+++ b/tools/console/daemon/main.c       Mon Aug 02 11:16:04 2010 +0100
@@ -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;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] Before this patch only log messages with precisely priority, Xen patchbot-4.0-testing <=