Skip to content

Commit

Permalink
feat: add support for logging.NOTSET level (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans authored Dec 1, 2024
1 parent a6cfc2f commit 915ba92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Options:
409600]
--log / --no-log Enable logging [env var:
GRANIAN_LOG_ENABLED; default: (enabled)]
--log-level [critical|error|warning|warn|info|debug]
--log-level [critical|error|warning|warn|info|debug|notset]
Log level [env var: GRANIAN_LOG_LEVEL;
default: (info)]
--log-config FILE Logging configuration file (json) [env var:
Expand Down
2 changes: 2 additions & 0 deletions granian/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class LogLevels(str, Enum):
warn = 'warn'
info = 'info'
debug = 'debug'
notset = 'notset'


log_levels_map = {
Expand All @@ -23,6 +24,7 @@ class LogLevels(str, Enum):
LogLevels.warn: logging.WARN,
LogLevels.info: logging.INFO,
LogLevels.debug: logging.DEBUG,
LogLevels.notset: logging.NOTSET,
}

LOGGING_CONFIG = {
Expand Down

0 comments on commit 915ba92

Please sign in to comment.