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

feat: Add redactText #43

Merged
merged 2 commits into from
May 2, 2022
Merged

feat: Add redactText #43

merged 2 commits into from
May 2, 2022

Conversation

AkiraJ48
Copy link
Contributor

@AkiraJ48 AkiraJ48 commented May 2, 2022

Purpose

Currently there's no way to redact specific fields within a string, you'd have to redact the entirety of the string via the redact option.

Approach

This allows consumers to pass in a function that would have access to the full text log, and allow them to redact specific strings within it.

Notes

N/A

Issues

Related to https://github.com/SEEK-Jobs/indie-jepsen/pull/240.

/**
* This allows finer control of redaction by providing access to the full text.
*/
redactLog?: (input: string, redactedDummy: string) => string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on naming:

Suggested change
redactLog?: (input: string, redactedDummy: string) => string;
redactText?: (logText: string, redactionPlaceholder: string) => string;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea those sound better 🙇 , I'll go with those 👍

Co-authored-by: Ryan Ling <rling@seek.com.au>
@AkiraJ48 AkiraJ48 changed the title feat: Add redactLog feat: Add redactText May 2, 2022
@AkiraJ48 AkiraJ48 merged commit f06fd3c into master May 2, 2022
@AkiraJ48 AkiraJ48 deleted the add-additional-redact-option branch May 2, 2022 21:34
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

Successfully merging this pull request may close these issues.

None yet

2 participants