mirror of
https://github.com/ceph/ceph
synced 2025-02-23 02:57:21 +00:00
ceph-disk: display the function name with the log messages
Signed-off-by: Loic Dachary <loic@dachary.org>
This commit is contained in:
parent
155a53d649
commit
0186062d29
@ -4559,13 +4559,14 @@ def setup_logging(verbose, log_stdout):
|
||||
if log_stdout:
|
||||
ch = logging.StreamHandler(stream=sys.stdout)
|
||||
ch.setLevel(loglevel)
|
||||
formatter = logging.Formatter('%(filename)s: %(message)s')
|
||||
formatter = logging.Formatter('%(funcName)s: %(message)s')
|
||||
ch.setFormatter(formatter)
|
||||
LOG.addHandler(ch)
|
||||
LOG.setLevel(loglevel)
|
||||
else:
|
||||
logging.basicConfig(
|
||||
level=loglevel,
|
||||
format='%(funcName)s: %(message)s',
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user