Skip to content

logger.error being used instead of logger.exception #65

@thiagotps

Description

@thiagotps

In many places throughout the code base, inside an except block, a call to logger.error is being issued, such as in _base.py:823

                except Exception as e:
                        logger.error(f"Could not apply patch: {e}")
                        if rt:
                            rt.error = f"Could not apply patch: {repr(e)}"

It would be more appropriate to use logger.exception, so the stack trace is included in the log, which is particularly useful when using json structured logging.

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