Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add runtime option to disable expunging #9

Open
VanceLongwill opened this issue Feb 27, 2024 · 0 comments
Open

Add runtime option to disable expunging #9

VanceLongwill opened this issue Feb 27, 2024 · 0 comments

Comments

@VanceLongwill
Copy link
Owner

For local debugging/dev environments etc there should be a way to disable expunging at runtime. This could be:

  • An env var
  • Some kind of init/guard similar to slog
  • Something else

When expunging is disabled the Expunge trait should return the original value verbatim, without redacting any values.

impl Expunge for T {
    fn expunge(self) -> Self
    where
        Self: Sized,
    {
        if expunge_disabled {
           return self;
        }
        // if not, then proceed as normal
        ...
    }
}

TODO:

  • Determine how the runtime state will be fetched from within the Expunge trait impl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant