From c804e399a59b7ccfb9636d96aa8a582687af94a3 Mon Sep 17 00:00:00 2001 From: chandanchowdhury Date: Wed, 1 May 2024 15:16:49 -0400 Subject: [PATCH] feat: use logging config from file Signed-off-by: chandanchowdhury --- cartography/cli.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cartography/cli.py b/cartography/cli.py index 5ee4fa35a6..9ef398de15 100644 --- a/cartography/cli.py +++ b/cartography/cli.py @@ -562,6 +562,9 @@ def main(self, argv: str) -> int: # TODO support parameter lookup in environment variables if not present on command line config: argparse.Namespace = self.parser.parse_args(argv) # Logging config + if config.logging_config: + logging.config.fileConfig(config.logging_config) + logger.info("Using logging config from %s", config.logging_config) if config.verbose: logging.getLogger('cartography').setLevel(logging.DEBUG) elif config.quiet: