Skip to content

Commit

Permalink
Add TestLogger for testing purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenroose committed Dec 5, 2017
1 parent 84c8d23 commit b69b9b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions log.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,8 +473,8 @@ func (l *slog) SetLevel(level Level) {
}

// Disabled is a Logger that will never output anything.
var Disabled Logger
var Disabled = &slog{lvl: LevelOff, b: NewBackend(ioutil.Discard)}

func init() {
Disabled = &slog{lvl: LevelOff, b: NewBackend(ioutil.Discard)}
}
// TestLogger is a Logger intended for unit testing that will log all messages
// to Stdout.
var TestLogger = &slog{lvl: LevelTrace, b: NewBackend(os.Stdout)}

0 comments on commit b69b9b0

Please sign in to comment.