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:
Ability to pass in a logger as an option.
Ability to pass log level as an option (also to disable library logging all together).
Ability to pass in a sanitize method.
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.
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:
I think a combination of 1+4 would probably cover most use cases.