bpo-40756: Default second argument of LoggerAdapter.__init__ to None (GH-20362)
The 'extra' argument is not always used by custom logger adapters. For
example:
```python
class IndentAdapter(logging.LoggerAdapter):
def process(self, msg, kwargs):
indent = kwargs.pop(indent, 1)
return ' ' * indent + msg, kwargs
```
It is cleaner and friendlier to default the 'extra' argument to None
instead of either forcing the subclasses of LoggerAdapter to pass a None
value directly or to override the constructor.
This change is backward compatible because existing calls to
`LoggerAdapter.__init__` are already passing a value for the second
argument.
Automerge-Triggered-By: @vsajip A
Arturo Escaip committed
8ad052464a4e0aef9a11663b80f187087b773592
Parent: db098bc
Committed by GitHub <noreply@github.com>
on 5/26/2020, 2:55:21 PM