go-kit/kit

How to leverage kit/log logging in several .go files/libraries without producing an overwhelming amount of output?

Open

#565 geöffnet am 6. Juli 2017

Auf GitHub ansehen
 (9 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (2.446 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (27.422 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

I have experience with log4cxx and log4net that support hierarchical logging. I'd like to include a range of logging in my libraries and .go files but I'm not sure what the best approach is to keep the console output down when doing so.

If I have an issue I'll raise the level to debug to see the details. Even though I know the issue is likely in a single or handful of .go files, or maybe in a library, raising the level means seeing the debug output from everywhere I'm using logging that is part of the execution path. I could comment those log entries out but that's a lot of extra time.

Is there a generally accepted way of including logging in all of your .go files and methods without overwhelming yourself with output that you don't need to enable unless debugging that particular file?

Contributor Guide