Commit 1fc7471
committed
docs: clarify append_context_keys behavior with overlapping keys
Fixes #7690
Clarifies that append_context_keys() removes all added keys on exit,
including keys that already existed with the same name. This addresses
user confusion about the 'temporarily' behavior when keys overlap.
Changes:
- Updated docstrings in formatter.py and logger.py with clear warning
- Added detailed documentation in logger.md with collision example
- Explains that original values are lost when keys overlap
- Recommends using append_keys() for persistent keys to avoid collisions
This is a documentation-only fix that clarifies current behavior without
changing functionality.1 parent 1041188 commit 1fc7471
File tree
3 files changed
+28
-0
lines changed- aws_lambda_powertools/logging
- docs/core
3 files changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
284 | 290 | | |
285 | 291 | | |
286 | 292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
823 | 829 | | |
824 | 830 | | |
825 | 831 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
198 | 214 | | |
199 | 215 | | |
200 | 216 | | |
| |||
0 commit comments