Skip to content

Conversation

@talber-nvidia
Copy link
Contributor

Calling logging.addLevelName() for existing log levels overrides the original values in Python's logging module, which then makes it incompatible with log levels assumed by SysLogHandler, see logging.handlers.SysLogHandler.priority_map.
This causes unexpected behavior when using SysLogHandler, basically making it print all messages to syslog with loglevel warning.
This fixes the log level inconsistency in messages such as:

WARNING info: eth0: enabling syslog for dhcp configuration
WARNING info: executing /bin/ip ...
WARNING info: executing /sbin/dhclient ...

Calling logging.addLevelName() for existing log levels overrides the
original values in Python's logging module, which then makes it
incompatible with log levels assumed by SysLogHandler.
This causes unexpected behavior when using SysLogHandler, basically
making it print all messages to syslog with loglevel warning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant