Skip to content
This repository was archived by the owner on Mar 6, 2023. It is now read-only.

Commit 38c3c49

Browse files
committed
Do not assign global logger variable in getLogger
Issue reported by @SpComb in 1e16ac3#r28010982
1 parent 06bd43a commit 38c3c49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graceful.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ func shutdown(s Shutdowner, logger Logger) {
218218

219219
func getLogger(loggers ...Logger) Logger {
220220
if len(loggers) > 0 {
221-
if logger = loggers[0]; logger != nil {
222-
return logger
221+
if loggers[0] != nil {
222+
return loggers[0]
223223
}
224224

225225
return log.New(ioutil.Discard, "", 0)

0 commit comments

Comments
 (0)