Skip to content

format_exc_info should add structured data about the exception to the event_dict #31

@wbolster

Description

@wbolster

The stdlib's Logger class has a .exception() method that is basically .error(..., exc_info=True). When porting an existing application that used logger.exception("oops something went wrong") in many exception handlers, all this code had to be updated to logger.error("oops...", exc_info=True).

Since the whole point of structlog.stdlib.BoundLogger is that it emulates the stdlib's Logger API, would you consider adding an .exception() method?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions