Skip to content

Commit 6a111d6

Browse files
authored
Map native fatal to critical (hynek#677)
Fixes hynek#640
1 parent 51641b7 commit 6a111d6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
3838

3939
[#669](https://github.com/hynek/structlog/pull/669)
4040

41+
- The native `FilteringBoundLogger.fatal()` method now maps to the critical level, as it does in the standard library.
42+
Note that the level is discouraged to use there, so we recommend to stick to `error()` or `critical()`.
43+
44+
[#677](https://github.com/hynek/structlog/pull/677)
45+
4146

4247
## [24.4.0](https://github.com/hynek/structlog/compare/24.3.0...24.4.0) - 2024-07-17
4348

src/structlog/_native.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ async def alog(
202202

203203
meths["exception"] = exception
204204
meths["aexception"] = aexception
205-
meths["fatal"] = meths["error"]
206-
meths["afatal"] = meths["aerror"]
205+
meths["fatal"] = meths["critical"]
206+
meths["afatal"] = meths["acritical"]
207207
meths["warn"] = meths["warning"]
208208
meths["awarn"] = meths["awarning"]
209209
meths["msg"] = meths["info"]

0 commit comments

Comments
 (0)