]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: support --verbose with --log-stdout
authorLoic Dachary <ldachary@redhat.com>
Sun, 20 Sep 2015 12:23:47 +0000 (14:23 +0200)
committerLoic Dachary <ldachary@redhat.com>
Tue, 22 Sep 2015 06:46:56 +0000 (08:46 +0200)
Set the LOG level as well as the channel level, otherwise the debug
messages are trimmed before they reach the channel. Also set the prefix
while we're at it.

http://tracker.ceph.com/issues/13180 Fixes: #13180

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/ceph-disk

index 18abad40850e0c6f4f2d14314b7537b9d8fa951e..104d4bc28465ced86e8af2a16e5ae0b671a3a6c3 100755 (executable)
@@ -3547,7 +3547,10 @@ def setup_logging(verbose, log_stdout):
     if log_stdout:
         ch = logging.StreamHandler(stream=sys.stdout)
         ch.setLevel(loglevel)
+        formatter = logging.Formatter('%(filename): %(message)s')
+        ch.setFormatter(formatter)
         LOG.addHandler(ch)
+        LOG.setLevel(loglevel)
     else:
         logging.basicConfig(
             level=loglevel,