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

Per-package/type/function level logging #625

Closed
omadawn opened this issue Aug 17, 2017 · 4 comments
Closed

Per-package/type/function level logging #625

omadawn opened this issue Aug 17, 2017 · 4 comments
Labels

Comments

@omadawn
Copy link

omadawn commented Aug 17, 2017

I'm coming to Go from Java and miss log4j. One of the biggest components I miss is the ability to have class (or better) level settings. I often want to log at trace level for the small portion of code I'm currently working on but don't want the clutter of all that for any other portion of my application. Or for the code I've included from other people.

This is implemented by loggo https://godoc.org/github.com/juju/loggo but I'm not sure the rest of their package is a huge benefit over what I've seen in logrus so far.

@dmathieu
Copy link
Contributor

Could you share a short code example showing how you'd see this working?

@yyscamper
Copy link

I had forked the logrus and implemented the module level logging: https://github.com/yyscamper/logrus#module-level-logging

@dgsb
Copy link
Collaborator

dgsb commented Oct 4, 2018

@omadawn that would be done with logrus by using different logger per package/module

@dgsb dgsb added the question label Oct 4, 2018
@dgsb
Copy link
Collaborator

dgsb commented May 27, 2020

no activity since 2018, question answered, closing

@dgsb dgsb closed this as completed May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants