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

Redactor logger #141

Open
wants to merge 1 commit into
base: lg/ionctl
Choose a base branch
from

Conversation

JLugagne
Copy link
Collaborator

Add a simple mechanism to hide credential using a redactor formatter for logrus.

To use it, you can create either a NewTextRedactor() to get the default TextFormatter from logrus and have the possibility to create your own redactor function or a NewTextSecretRedactor to define a redactor using you own redactor function.

To help you to create your redactor, you can use NewSecretRedact(secrets [][]byte, redacted []byte) that replace all secrets by redacted.

To use this formatter you have to set it into your logrus logger.

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.

1 participant