Skip to content

Commit

Permalink
feat: use logging config from file
Browse files Browse the repository at this point in the history
Signed-off-by: chandanchowdhury <[email protected]>
  • Loading branch information
chandanchowdhury committed Nov 27, 2024
1 parent 7327354 commit c804e39
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cartography/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c804e39

Please sign in to comment.