From 194a742fb922c20db0a70100e5f2aaadf03c2acf Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 15 Jul 2016 17:06:17 +0800 Subject: #2798 fix assign operation not take effect --- modules/log/log.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/log/log.go b/modules/log/log.go index 5e4bf6c120..41be414051 100644 --- a/modules/log/log.go +++ b/modules/log/log.go @@ -23,10 +23,10 @@ func NewLogger(bufLen int64, mode, config string) { logger := newLogger(bufLen) isExist := false - for _, l := range loggers { + for i, l := range loggers { if l.adapter == mode { isExist = true - l = logger + loggers[i] = logger } } if !isExist { -- cgit v1.2.3