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

如何配置 logback.xml 文件路径 #181

Open
lwQin opened this issue Jan 27, 2022 · 2 comments
Open

如何配置 logback.xml 文件路径 #181

lwQin opened this issue Jan 27, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@lwQin
Copy link

lwQin commented Jan 27, 2022

使用 web 控制台管理日志等级时报错没有发现 logback.xml 配置文件不存在
ccfcb59f9a298af3a340e835dbb8023a

在源码中发现是通过 new File("logback.xml") 获取路径为 file:/data/tars/app_log/logback.xml的 logback 配置文件,但是实际配置文件在 classpath:logback.xml
Xnip2022-01-27_12-07-52
Xnip2022-01-27_12-19-33

@TimmyYu
Copy link
Contributor

TimmyYu commented Jan 27, 2022

这里是有问题, reload的时候 。应该是classpath下,

@TimmyYu TimmyYu added the bug Something isn't working label Jan 27, 2022
@TimmyYu TimmyYu self-assigned this Jan 27, 2022
TimmyYu pushed a commit that referenced this issue Jan 27, 2022
 load logback config from classpath
@beyondhc
Copy link

beyondhc commented Oct 11, 2023

@TimmyYu 看代码这并不是通过修改配置文件的值来更新日志级别,是不是不需要重新reload logback的配置文件,直接执行resetLogLevel是否就可以?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants