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

Ability to control logging behavior #46

Open
erezrokah opened this issue Sep 18, 2019 · 0 comments
Open

Ability to control logging behavior #46

erezrokah opened this issue Sep 18, 2019 · 0 comments

Comments

@erezrokah
Copy link

I've created a CircleCI custom resource using this library and it works pretty well, thank you :)

The only issue I have is that the library logs the event including the ApiToken property I pass to the custom resource. I would like to avoid logging sensitive data, or at least sanitize it.

I can probably monkey patch console.log but that seems very ugly.

I can create a pull request for this issue my self, but would like to decide first on a solution.
Possible solutions:

  1. Ability to pass in a logger as an option.
  2. Ability to pass log level as an option (also to disable library logging all together).
  3. Ability to pass in a sanitize method.
  4. Normalize the library logs with a common prefix to easily identify log messages.

I think a combination of 1+4 would probably cover most use cases.

@erezrokah erezrokah changed the title Ability to control logging behavoir Ability to control logging behavior Sep 18, 2019
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