Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INFO nacos_client/nacos_client.go:65 是个stderr #609

Open
doraddl opened this issue Apr 28, 2023 · 6 comments
Open

INFO nacos_client/nacos_client.go:65 是个stderr #609

doraddl opened this issue Apr 28, 2023 · 6 comments
Labels

Comments

@doraddl
Copy link

doraddl commented Apr 28, 2023

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

v2.2.1

What version of nacos-sever are you using?

v2.0.2

What version of Go are you using (go version)?

go v1.9

What operating system (Linux, Windows, …) and version?

linux

What did you do?

If possible, provide a recipe for reproducing the error.
下面这个日志 是个stderr ,原因可能是客户端被初始化先就使用该logger输出,导致初始化nacos配置里的logLevel/ os.stdout等均不生效
INFO nacos_client/nacos_client.go:65

预期结果:没有stderr输出

@binbin0325
Copy link
Member

这里有默认初始化

@doraddl
Copy link
Author

doraddl commented May 4, 2023

这里有默认初始化

我意思是 这个初始化出来的就是stderr, 不是stdout

@binbin0325
Copy link
Member

我意思是 这个初始化出来的就是stderr, 不是stdout

在这个场景下有什么差别吗?可以举个例子

@doraddl
Copy link
Author

doraddl commented May 9, 2023

我意思是 这个初始化出来的就是stderr, 不是stdout

在这个场景下有什么差别吗?可以举个例子

直接运行
go run main.go 2> stderr.log

或者编译后运行
./main 2> stderr.log

会发现错误日志文件stderr.log里有这个info日志输出

期望是: 不应该在这错误日志里,而是直接在控制台输出

@Isaacedvr
Copy link

这个标准输出太影响实际业务的标准输出,希望官方修复此BUG。逼着自己修改官方源码。

@xxlv
Copy link

xxlv commented Aug 10, 2023

我也想吐槽一下。

我想做一个cli 应用,一旦使用nacos sdk ,在启动应用的时候,这行日志真的体验非常不好。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants