Skip to content

Add a way to preprocess variables before printing #72

@mmev

Description

@mmev

Hi there,

I've encountered the issue already mentioned in #50.
Current implementation doesn’t let me fully hide sensitive data from the logs (dict variables, class representation string, etc).

I'd like to propose adding an optional keyword argument to the show, format, and format_current_stack methods that accepts a Callable. This function would receive each variable as it's being processed, allowing users to apply transformation before it's printed to the console. That way, any custom types can be handled as well.

I'd be happy to work on a PR for this if that's okay with you.

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