-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Nacos-Client log print to application logs, not print to nacos' log #3133
Comments
Environment 环境
Launch启动Question问题我在YAML、PROPERTIES、JVM、ENV尝试了配置参数都不能令其消失,这应该如何进行配置? |
In See more details: alibaba/nacos#9970 |
The console logs are not printed correctly to the nacos log file because the |
This issue has been open 30 days with no activity. This will be closed in 7 days. |
Which Component
Nacos Discovery/Config
Describe the bug
Relative issue #1931.
After the issue fix problem, the problem fixed by some old version.
But in some new version, the problem started again. After my debug and research. I fount that the problem is caused by the spring will call the
LoggingSystem.initialize
fromPropertySourceBootstrapConfiguration
after allApplicationEnvironmentPreparedEvent
.But
NacosLoggingListener
in Nacos Discovery/Config only handleApplicationEnvironmentPreparedEvent
not loadConfiguration again afterPropertySourceBootstrapConfiguration
. So the log config still be overwrite by spring.To Reproduce
Steps to reproduce the behavior:
2.2.9.RELEASE
Expected behavior
nacos client log print into ${user.home}/naming.log or config.log
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
MacOS 、Java8 、 Version 2.2.6.RELEASE ~ 2.2.9.RELEASE
I don't test for 2021.X and 2022.X. Please community to check and fix.
The text was updated successfully, but these errors were encountered: