Skip to content
This repository was archived by the owner on Dec 21, 2024. It is now read-only.

Commit fb038d6

Browse files
authored
Merge branch 'master' into unused-very-custom
2 parents 2159382 + 81c7b71 commit fb038d6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/pythonjsonlogger/jsonlogger.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class JsonFormatter(logging.Formatter):
8282
def __init__(self, *args, **kwargs):
8383
"""
8484
:param json_default: a function for encoding non-standard objects
85-
as outlined in http://docs.python.org/2/library/json.html
85+
as outlined in https://docs.python.org/3/library/json.html
8686
:param json_encoder: optional custom encoder
8787
:param json_serializer: a :meth:`json.dumps`-compatible callable
8888
that will be used to serialize the log record.
@@ -229,11 +229,7 @@ def format(self, record: logging.LogRecord) -> str:
229229
pass
230230

231231
log_record: Dict[str, Any]
232-
try:
233-
log_record = OrderedDict()
234-
except NameError:
235-
log_record = {}
236-
232+
log_record = OrderedDict()
237233
self.add_fields(log_record, record, message_dict)
238234
log_record = self.process_log_record(log_record)
239235

0 commit comments

Comments
 (0)