This is an automated email from the ASF dual-hosted git repository. alexstocks pushed a commit to branch 1.5.1 in repository https://gitbox.apache.org/repos/asf/dubbo-go.git
The following commit(s) were added to refs/heads/1.5.1 by this push: new aa796a8 forbid excuting twice aa796a8 is described below commit aa796a8f8382a4a6140211637cfe92c1ebc9f110 Author: cvictory <shenglic...@gmail.com> AuthorDate: Tue Aug 18 14:54:06 2020 +0800 forbid excuting twice --- common/logger/logger.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/logger/logger.go b/common/logger/logger.go index b648f8a..63eda23 100644 --- a/common/logger/logger.go +++ b/common/logger/logger.go @@ -60,6 +60,10 @@ type Logger interface { } func init() { + // forbidden to executing twice. + if logger != nil { + return + } logConfFile := os.Getenv(constant.APP_LOG_CONF_FILE) err := InitLog(logConfFile) if err != nil {