diff options
-rw-r--r-- | Lib/logging/__init__.py | 2 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2020-05-24-11-06-37.bpo-40756.7ZH83z.rst | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index 403dc81b13..6d27301a70 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1751,7 +1751,7 @@ class LoggerAdapter(object): information in logging output. """ - def __init__(self, logger, extra): + def __init__(self, logger, extra=None): """ Initialize the adapter with a logger and a dict-like object which provides contextual information. This constructor signature allows diff --git a/Misc/NEWS.d/next/Library/2020-05-24-11-06-37.bpo-40756.7ZH83z.rst b/Misc/NEWS.d/next/Library/2020-05-24-11-06-37.bpo-40756.7ZH83z.rst new file mode 100644 index 0000000000..a970f5be15 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-05-24-11-06-37.bpo-40756.7ZH83z.rst @@ -0,0 +1,2 @@ +The second argument (extra) of ``LoggerAdapter.__init__`` now defaults to +None. |