Skip to content

Commit

Permalink
fix: KeyError if _granian logger is missing in user logging configu…
Browse files Browse the repository at this point in the history
…ration.
  • Loading branch information
monosans committed Nov 21, 2024
1 parent c94e73e commit 3a9fec8
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 3a9fec8

Please sign in to comment.