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

Logger should accept fmt along with args #70

Closed
mm97mm opened this issue Apr 8, 2021 · 5 comments
Closed

Logger should accept fmt along with args #70

mm97mm opened this issue Apr 8, 2021 · 5 comments

Comments

@mm97mm
Copy link
Contributor

mm97mm commented Apr 8, 2021

Here we print %s literally

h.logger.Warn("cannot write DNS message back to client: %s", err)

@qdm12
Copy link
Owner

qdm12 commented Apr 8, 2021

Thanks for notifying me. I'll look into it, I need to add test cases. FYI it uses that little block to format things.

@mm97mm
Copy link
Contributor Author

mm97mm commented Apr 8, 2021

Oh, I see. I ran an example (dot-server) and it implements logger just as a fowarder to stdlib log.Println

@qdm12
Copy link
Owner

qdm12 commented Apr 8, 2021

Oh indeed. I'll update the examples to support that behavior. Sorry I haven't digged too much in my own examples 😅

@mm97mm
Copy link
Contributor Author

mm97mm commented Apr 8, 2021

Unrelated: I stumbled across issue about v2 version. Did I understand correctly: you'd like to get rid of unbound and use dot/doh implementation you made? (sources in pkg)

@qdm12 qdm12 closed this as completed in 7e95f44 Apr 8, 2021
@qdm12
Copy link
Owner

qdm12 commented Apr 8, 2021

About the Unrelated, let's talk on #75

I changed in 7e95f44 the code to work with log.Println. We can modify the pkg code to also use for example logger.Info(var1, var2, "blabla") and that will work fine, but the formatting feature is 'not meant to be' let's say.

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

2 participants