]> sourceware.org Git - lvm2.git/commitdiff
libdaemon: allow all debug levels for stderr
authorDavid Teigland <teigland@redhat.com>
Wed, 21 Oct 2015 16:16:59 +0000 (11:16 -0500)
committerDavid Teigland <teigland@redhat.com>
Wed, 21 Oct 2015 16:19:18 +0000 (11:19 -0500)
The parsing code for log levels was missing
some levels.  Also ignore an unrecognized
level name rather than failing.

libdaemon/server/daemon-log.c

index 5ea5cdc76d879a70c353b1edebcba51569a4924b..abe602b3ff03fd1edfa86d6f039a572de91b6870 100644 (file)
@@ -160,12 +160,18 @@ static int _parse_one(log_state *s, int outlet, const char *type, int enable)
        if (!strcmp(type, "all"))
                for (i = 0; i < 32; ++i)
                        daemon_log_enable(s, outlet, i, enable);
+       else if (!strcmp(type, "fatal"))
+               daemon_log_enable(s, outlet, DAEMON_LOG_FATAL, enable);
+       else if (!strcmp(type, "error"))
+               daemon_log_enable(s, outlet, DAEMON_LOG_ERROR, enable);
+       else if (!strcmp(type, "warn"))
+               daemon_log_enable(s, outlet, DAEMON_LOG_WARN, enable);
+       else if (!strcmp(type, "warn"))
+               daemon_log_enable(s, outlet, DAEMON_LOG_INFO, enable);
        else if (!strcmp(type, "wire"))
                daemon_log_enable(s, outlet, DAEMON_LOG_WIRE, enable);
        else if (!strcmp(type, "debug"))
                daemon_log_enable(s, outlet, DAEMON_LOG_DEBUG, enable);
-       else
-               return 0;
 
        return 1;
 }
This page took 0.038934 seconds and 5 git commands to generate.