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

Write log to /dev/null by default (ioutil.Discard) #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aerth
Copy link
Contributor

@aerth aerth commented Feb 12, 2020

If a module actually wants to use debug log, open a file (or use stderr) and then pkcs11mod.SetLogOutput(f)

This PR closes #4

@JeremyRand
Copy link
Member

@aerth Is there a reason why we need to set it to ioutil.Discard and then have the backend call SetLogOutput with the actual Writer? Why not simply not set any logger in pkcs11mod, and let the backend deal with the log package directly?

@JeremyRand
Copy link
Member

Also I'd prefer that the gofmt fixes be in a separate commit from the logging fixes (but the same PR is fine).

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.

Remove log file paths
2 participants