You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2020/08/22 04:24:38 UTC

[dubbo-go] branch master updated: forbid excuting twice

This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/master by this push:
     new 1166752  forbid excuting twice
     new 6ccbc6c  Merge pull request #719 from cvictory/log_opt
1166752 is described below

commit 1166752b6f9bd3ce80aa6ae7dc243ca64c851cb7
Author: cvictory <sh...@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 {