-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
不用springboot怎么能让log4j2取到apollo的配置? #1007
Comments
在不是Spring的环境下,可通过编程API的方式获取配置。所以,你得看一下log4j2有没有API,可以在代码里配置日志路径的接口,如果有就可以跟Apollo对接上了。 |
可以参考 #816 |
继承ConfigurationFactory getConfiguration 重写这个方法就可以 |
使用log4j2也遇到了apollo管理日志路径的问题,可以利用log4j2的Property Substitution特性。
|
1.2.0版本已经支持Spring Boot中Apollo的加载顺序放到日志系统加载之前,从而可以支持日志配置放在Apollo管理(如logging.level.root=info或logback-spring.xml中的参数),可以尝试一下。 |
没用springboot,logs4j2.xml里怎么能取到配置?主要是用来配置日志路径
The text was updated successfully, but these errors were encountered: