Skip to content

Commit

Permalink
Avoid logger configuration errors when _granian logger is missing (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans authored Nov 22, 2024
1 parent 9c7b33c commit a6cfc2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion granian/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def configure_logging(level: LogLevels, config: Optional[Dict[str, Any]] = None,
if config:
log_config.update(config)

log_config['loggers']['_granian']['level'] = log_levels_map[level]
log_config['loggers'].setdefault('_granian', {})['level'] = log_levels_map[level]
logging.config.dictConfig(log_config)

if not enabled:
Expand Down

0 comments on commit a6cfc2f

Please sign in to comment.