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
* chore: disable fail fast on pre-commit
Signed-off-by: heitorlessa <[email protected]>
* feat: add core utilities as high level imports
* chore: update to high level imports
* fix: flake8 exclude and specific files
* chore: remove fail_fast param completely
Signed-off-by: heitorlessa <[email protected]>
* fix: separate logging import into separate file
Copy file name to clipboardExpand all lines: docs/content/core/logger.mdx
+5-5
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ By default, Logger uses **INFO** log level. You can either change log level via
37
37
You can also explicitly set a service name via `service` param or via `POWERTOOLS_SERVICE_NAME` env var. This sets **service** key that will be present across all log statements.
38
38
39
39
```python:title=app.py
40
-
from aws_lambda_powertools.loggingimport Logger
40
+
from aws_lambda_powertools import Logger
41
41
# POWERTOOLS_SERVICE_NAME defined
42
42
logger = Logger() # highlight-line
43
43
@@ -63,7 +63,7 @@ Key | Type | Example | Description
63
63
You can enrich your structured logs with key Lambda context information via `inject_lambda_context`.
64
64
65
65
```python:title=collect.py
66
-
from aws_lambda_powertools.loggingimport Logger
66
+
from aws_lambda_powertools import Logger
67
67
68
68
logger = Logger()
69
69
@@ -86,7 +86,7 @@ You can also explicitly log any incoming event using `log_event` param or via `P
86
86
</Note><br/>
87
87
88
88
```python:title=log_handler_event.py
89
-
from aws_lambda_powertools.loggingimport Logger
89
+
from aws_lambda_powertools import Logger
90
90
91
91
logger = Logger()
92
92
@@ -151,7 +151,7 @@ Key | Type | Example
151
151
You can append your own keys to your existing Logger via `structure_logs` with **append** param.
152
152
153
153
```python:title=collect.py
154
-
from aws_lambda_powertools.loggingimport Logger
154
+
from aws_lambda_powertools import Logger
155
155
156
156
logger = Logger()
157
157
@@ -194,7 +194,7 @@ This happens on an entire request basis, and <strong>DEBUG</strong> level is set
@@ -91,7 +94,8 @@ with single_metric(name="ColdStart", unit=MetricUnit.Count, value=1, namespace="
91
94
As you finish adding all your metrics, you need to serialize and flush them to standard output. You can do that right before you return your response to the caller via `log_metrics`.
92
95
93
96
```python:title=lambda_handler.py
94
-
from aws_lambda_powertools.metrics import Metrics, MetricUnit
97
+
from aws_lambda_powertools import Metrics
98
+
from aws_lambda_powertools.metrics import MetricUnit
0 commit comments