Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Commit

Permalink
Logger: Don't debug-log if logger is nil.
Browse files Browse the repository at this point in the history
This is to fix #441.

PiperOrigin-RevId: 325283544
  • Loading branch information
manugarg committed Aug 6, 2020
1 parent 2a846bd commit d2d9e53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func (l *Logger) Critical(payload ...string) {

// Debugf logs formatted text messages with logging level "Debug".
func (l *Logger) Debugf(format string, args ...interface{}) {
if l.debugLog {
if l != nil && l.debugLog {
l.log(logging.Debug, fmt.Sprintf(format, args...))
}
}
Expand Down

0 comments on commit d2d9e53

Please sign in to comment.