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>
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,