Skip to content

Commit

Permalink
调整 [INFO] logDir cacheDir 日志输出 (#590)
Browse files Browse the repository at this point in the history
* 使用 logger 替换 log 在配置时的输出
  • Loading branch information
Cotch22 authored Mar 23, 2023
1 parent 859cdce commit 43cf5ae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions clients/nacos_client/nacos_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package nacos_client

import (
"log"
"os"
"strconv"

Expand All @@ -26,6 +25,7 @@ import (
"github.com/nacos-group/nacos-sdk-go/v2/common/constant"
"github.com/nacos-group/nacos-sdk-go/v2/common/file"
"github.com/nacos-group/nacos-sdk-go/v2/common/http_agent"
"github.com/nacos-group/nacos-sdk-go/v2/common/logger"
)

type NacosClient struct {
Expand Down Expand Up @@ -61,7 +61,9 @@ func (client *NacosClient) SetClientConfig(config constant.ClientConfig) (err er
if config.LogDir == "" {
config.LogDir = file.GetCurrentPath() + string(os.PathSeparator) + "log"
}
log.Printf("[INFO] logDir:<%s> cacheDir:<%s>", config.LogDir, config.CacheDir)

logger.Infof("logDir:<%s> cacheDir:<%s>", config.LogDir, config.CacheDir)

client.clientConfig = config
client.clientConfigValid = true

Expand Down

0 comments on commit 43cf5ae

Please sign in to comment.