You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core/logger.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ Key | Example | Note
53
53
**message**: `Any` | `Collecting payment` | Unserializable JSON values are casted as `str`
54
54
**timestamp**: `str` | `2021-05-03 10:20:19,650+0200` | Timestamp with milliseconds, by default uses local timezone
55
55
**service**: `str` | `payment` | Service name defined, by default `service_undefined`
56
-
**xray_trace_id**: `str` | `1-5759e988-bd862e3fe1be46a994272793` | When [tracing is enabled](https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html), it shows X-Ray Trace ID
56
+
**xray_trace_id**: `str` | `1-5759e988-bd862e3fe1be46a994272793` | When [tracing is enabled](https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html){target="_blank"}, it shows X-Ray Trace ID
57
57
**sampling_rate**: `float` | `0.1` | When enabled, it shows sampling rate in percentage e.g. 10%
58
58
**exception_name**: `str` | `ValueError` | When `logger.exception` is used and there is an exception
59
59
**exception**: `str` | `Traceback (most recent call last)..` | When `logger.exception` is used and there is an exception
@@ -644,7 +644,7 @@ You might want to continue to use the same date formatting style, or override `l
644
644
Logger allows you to either change the format or suppress the following keys altogether at the initialization: `location`, `timestamp`, `level`, `xray_trace_id`.
645
645
646
646
=== "lambda_handler.py"
647
-
> We honour standard [logging library string formats](https://docs.python.org/3/howto/logging.html#displaying-the-date-time-in-messages).
647
+
> We honour standard [logging library string formats](https://docs.python.org/3/howto/logging.html#displaying-the-date-time-in-messages){target="_blank"}.
648
648
649
649
```python hl_lines="7 10"
650
650
from aws_lambda_powertools import Logger
@@ -849,7 +849,7 @@ For **replacing the formatter entirely**, you can subclass `BasePowertoolsFormat
849
849
850
850
#### Bring your own JSON serializer
851
851
852
-
By default, Logger uses `json.dumps` and `json.loads` as serializer and deserializer respectively. There could be scenarios where you are making use of alternative JSON libraries like [orjson](https://github.com/ijl/orjson).
852
+
By default, Logger uses `json.dumps` and `json.loads` as serializer and deserializer respectively. There could be scenarios where you are making use of alternative JSON libraries like [orjson](https://github.com/ijl/orjson){target="_blank"}.
853
853
854
854
As parameters don't always translate well between them, you can pass any callable that receives a `Dict` and return a `str`:
855
855
@@ -943,7 +943,7 @@ This is a Pytest sample that provides the minimum information necessary for Logg
943
943
```
944
944
945
945
!!! tip
946
-
If you're using pytest and are looking to assert plain log messages, do check out the built-in [caplog fixture](https://docs.pytest.org/en/latest/how-to/logging.html).
946
+
If you're using pytest and are looking to assert plain log messages, do check out the built-in [caplog fixture](https://docs.pytest.org/en/latest/how-to/logging.html){target="_blank"}.
0 commit comments