Commit 74d0fb1
The docs say about `logging.LoggerAdapter`:
<blockquote>
An easy way in which you can pass contextual information to be output along
with logging event information is to use the [`LoggerAdapter`](https://docs.python.org/3/library/logging.html#logging.LoggerAdapter) class.
This class is designed to look like a [`Logger`](https://docs.python.org/3/library/logging.html#logging.Logger), so that you can call
[`debug()`](https://docs.python.org/3/library/logging.html#logging.debug), [`info()`](https://docs.python.org/3/library/logging.html#logging.info), [`warning()`](https://docs.python.org/3/library/logging.html#logging.warning), [`error()`](https://docs.python.org/3/library/logging.html#logging.error),
[`exception()`](https://docs.python.org/3/library/logging.html#logging.exception), [`critical()`](https://docs.python.org/3/library/logging.html#logging.critical) and [`log()`](https://docs.python.org/3/library/logging.html#logging.log). These methods have the
same signatures as their counterparts in [`Logger`](https://docs.python.org/3/library/logging.html#logging.Logger), so you can use the
two types of instances interchangeably.
</blockquote>
Co-authored-by: Jean-Charles BERTIN <[email protected]>
1 parent a0dc886 commit 74d0fb1
2 files changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | | - | |
| 8 | + | |
8 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
9 | 15 | | |
10 | 16 | | |
11 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
0 commit comments