Skip to content

Commit

Permalink
Transplant comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Jul 13, 2024
1 parent 667217e commit 9649e8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/structlog/_log_levels.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,14 @@


def map_method_name(method_name: str) -> str:
# warn is just a deprecated alias in the stdlib.
if method_name == "warn":
return "warning"

# Calling exception("") is the same as error("", exc_info=True)
if method_name == "exception":
return "error"

return method_name


Expand Down

0 comments on commit 9649e8b

Please sign in to comment.