-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
The git subpackage uses Go's log package to print debugging information, which is suppressed by package main unless DGIT_TRACE is set.
I think this logic is backwards, because anyone who imports "github.com/driusan/dgit/git" to work with a git repo gets the noisy output by default and needs to manually suppress it. It also means that anyone using package log for their own purposes can't use the library.
We should probably be setting a logger in an init function in package git which discards by default, and adding a SetDebug(log.Logger) method (or perhaps something on the client object) to make the git subpackage more useful outside of the dgit command line without jumping through extra hoops.
Reactions are currently unavailable