Skip to content

Commit 3589ea2

Browse files
committed
Fixed two mypy issues with utils.log code to set loggin handlers.
- Legacy-Id: 17987
1 parent d1ca760 commit 3589ea2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ietf/utils/log.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import sys
66
import logging
7+
import logging.handlers
78
import inspect
89
import os.path
910
import traceback
@@ -27,7 +28,12 @@
2728
logger = logging.getLogger(name)
2829
if not logger.hasHandlers():
2930
debug.say(' Adding handlers to logger %s' % logger.name)
30-
handlers = [ logging.StreamHandler(), logging.handlers.SysLogHandler(address='/dev/log', facility='user') ]
31+
32+
handlers = [
33+
logging.StreamHandler(),
34+
logging.handlers.SysLogHandler(address='/dev/log',
35+
facility=logging.handlers.SysLogHandler.LOG_USER),
36+
]
3137
for h in handlers:
3238
h.setFormatter(formatter)
3339
h.setLevel(level)

0 commit comments

Comments
 (0)