Skip to content

Commit 7abc043

Browse files
committed
docs: add new env var, explicit warning on its use
Signed-off-by: heitorlessa <[email protected]>
1 parent 55ad6fa commit 7abc043

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/content/core/logger.mdx

+12
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,18 @@ def test_lambda_handler(lambda_handler, lambda_context):
439439
lambda_handler(test_event, lambda_context) # this will now have a Context object populated
440440
```
441441

442+
### pytest live log feature
443+
444+
Pytest Live Log feature duplicates emitted log messages in order to style log statements according to their levels, for this to work use `POWERTOOLS_LOG_DEDUPLICATION_DISABLED` env var.
445+
446+
```bash:title=pytest_live_log.sh
447+
POWERTOOLS_LOG_DEDUPLICATION_DISABLED="1" pytest -o log_cli=1
448+
```
449+
450+
<Note type="warning">
451+
This feature should be used with care, as it explicitly disables our ability to filter propagated messages to the root logger (if configured).
452+
</Note><br/>
453+
442454
## FAQ
443455

444456
**How can I enable boto3 and botocore library logging?**

docs/content/index.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ Environment variable | Description | Utility | Default
138138
**POWERTOOLS_TRACE_MIDDLEWARES** | Creates sub-segment for each custom middleware | [Middleware factory](./utilities/middleware_factory) | `false`
139139
**POWERTOOLS_LOGGER_LOG_EVENT** | Logs incoming event | [Logging](./core/logger) | `false`
140140
**POWERTOOLS_LOGGER_SAMPLE_RATE** | Debug log sampling | [Logging](./core/logger) | `0`
141+
**POWERTOOLS_LOG_DEDUPLICATION_DISABLED** | Disables log deduplication filter protection to use Pytest Live Log feature | [Logging](./core/logger) | `false`
141142
**LOG_LEVEL** | Sets logging level | [Logging](./core/logger) | `INFO`
142143

143144
## Debug mode

0 commit comments

Comments
 (0)