Fixed a couple of mypy errors.

- Legacy-Id: 17977
This commit is contained in:
Henrik Levkowetz 2020-06-12 22:05:03 +00:00
parent 96bbf3457a
commit c5f6883624
2 changed files with 4 additions and 4 deletions

View file

@ -251,7 +251,7 @@ LOGGING = {
'class': 'logging.handlers.SysLogHandler',
'facility': 'user',
'formatter': 'plain',
'address': '/dev/log'
'address': '/dev/log',
},
'debug_console': {
# Active only when DEBUG=True
@ -313,7 +313,7 @@ LOGGING = {
# other) custom log settings are wanted. Use "ietf/manage.py showloggers -l"
# to show registered loggers. The content here should match the levels above
# and is shown as an example:
UTILS_LOGGER_LEVELS = {
UTILS_LOGGER_LEVELS: Dict[str, str] = {
'django': 'INFO',
'django.server': 'INFO',
}

View file

@ -22,8 +22,8 @@ from django.conf import settings
import debug # pyflakes:ignore
for logger, level in settings.UTILS_LOGGER_LEVELS.items():
logger = logging.getLogger(logger)
for name, level in settings.UTILS_LOGGER_LEVELS.items():
logger = logging.getLogger(name)
debug.say(" Setting %s logging level to %s" % (logger.name, level))
logger.setLevel(level)