Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial logging Refactoring Bugfix #55441

Merged
merged 2 commits into from
Nov 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions salt/_logging/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ class __StoreLoggingHandler(TemporaryLoggingHandler):
class SaltLogRecord(logging.LogRecord):
def __init__(self, *args, **kwargs):
logging.LogRecord.__init__(self, *args, **kwargs)
self.bracketname = '[{:<17}]'.format(self.name)
self.bracketlevel = '[{:<8}]'.format(self.levelname)
self.bracketprocess = '[{:>5}]'.format(self.process)
self.bracketname = '[{:<17}]'.format(str(self.name))
self.bracketlevel = '[{:<8}]'.format(str(self.levelname))
self.bracketprocess = '[{:>5}]'.format(str(self.process))
Akm0d marked this conversation as resolved.
Show resolved Hide resolved


class SaltColorLogRecord(SaltLogRecord):
Expand Down Expand Up @@ -241,7 +241,7 @@ def __new__(cls, *args):
def _log(self, level, msg, args, exc_info=None,
extra=None, # pylint: disable=arguments-differ
stack_info=False,
stack_level=1,
stacklevel=1,
exc_info_on_loglevel=None):
if extra is None:
extra = {}
Expand Down Expand Up @@ -290,7 +290,7 @@ def _log(self, level, msg, args, exc_info=None,
else:
LOGGING_LOGGER_CLASS._log(
self, level, msg, args, exc_info=exc_info, extra=extra,
stack_info=stack_info, stack_level=stack_level
stack_info=stack_info, stacklevel=stacklevel
)

def makeRecord(self, name, level, fn, lno, msg, args, exc_info,
Expand Down