From: Redouane Kachach Date: Mon, 18 Apr 2022 13:42:39 +0000 (+0200) Subject: mgr/cephadm: fixing logging output for rm-cluster operation X-Git-Tag: v18.0.0~1021^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F45931%2Fhead;p=ceph.git mgr/cephadm: fixing logging output for rm-cluster operation Fixes: https://tracker.ceph.com/issues/51671 Signed-off-by: Redouane Kachach --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 58315e602ef6..d2b5f7f0d3bf 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -260,10 +260,10 @@ class ExcludeErrorsFilter(logging.Filter): return record.levelno < logging.WARNING -# During bootstrap operation we use: +# When cephadm is used as standard binary (bootstrap, rm-cluster, etc) we use: # stdout: for debug and info # stderr: for errors and warnings -bootstrap_logging_config = { +interactive_logging_config = { 'version': 1, 'filters': { 'exclude_errors': { @@ -8937,8 +8937,9 @@ def cephadm_init_logging(ctx: CephadmContext, args: List[str]) -> None: global logger if not os.path.exists(LOG_DIR): os.makedirs(LOG_DIR) - if 'bootstrap' in args: - dictConfig(bootstrap_logging_config) + operations = ['bootstrap', 'rm-cluster'] + if any(op in args for op in operations): + dictConfig(interactive_logging_config) else: dictConfig(logging_config)