Skip to content

Commit

Permalink
expose HasDebug for default logger as well
Browse files Browse the repository at this point in the history
  • Loading branch information
dropwhile committed Sep 22, 2019
1 parent 92e3d1f commit 13da129
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions default_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ func SetFlags(flags FlagSet) {
DefaultLogger.SetFlags(flags)
}

// HasDebug returns true if the default Logger has debug logging FlagSet enabled.
// See Logger.HasDebug
func HasDebug() bool {
return DefaultLogger.HasDebug()
}

// Debugm logs to the default Logger. See Logger.Debugm
func Debugm(message string, v Map) {
if DefaultLogger.HasDebug() {
Expand Down

0 comments on commit 13da129

Please sign in to comment.