Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuri-su authored Mar 5, 2024
1 parent 389f6b6 commit 6dd8997
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion common/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ func BuildLoggerConfig(clientConfig constant.ClientConfig) Config {
func InitLogger(config Config) (err error) {
logLock.Lock()
defer logLock.Unlock()
if logger != nil {
return
}
logger, err = InitNacosLogger(config)
return
}
Expand Down Expand Up @@ -157,7 +160,7 @@ func getEncoder() zapcore.EncoderConfig {
}
}

//SetLogger sets logger for sdk
// SetLogger sets logger for sdk
func SetLogger(log Logger) {
logLock.Lock()
defer logLock.Unlock()
Expand Down

0 comments on commit 6dd8997

Please sign in to comment.