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

使用ognl更改日志信息失败 #2896

Closed
1 task
mitht opened this issue Sep 10, 2024 · 1 comment
Closed
1 task

使用ognl更改日志信息失败 #2896

mitht opened this issue Sep 10, 2024 · 1 comment
Milestone

Comments

@mitht
Copy link

mitht commented Sep 10, 2024

  • 我已经在 issues 里搜索,没有重复的issue。

环境信息

Arthas script version: 4.0.0

重现问题的步骤

1.使用 logger打印出日志框架信息
2.通过ognl更改日志输出信息

期望的结果

日志输出格式变成动态修改的格式输出

实际运行的结果

image

ognl '@ch.qos.logback.classic.Logger@getLogger("ROOT").getAppender("CONSOLE").getEncoder().setPattern("%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg [traceId: %mdc{trace_id}] [spanId: %mdc{span_id}]%n")'

ognl '@ch.qos.logback.classic.Logger@getLogger("ROOT").getLoggerContext().reset()'

执行ognl命令后,日志输出格式没有变化

@hengyunabc
Copy link
Collaborator

和这个应该是类似的原因: #2892

可以直接试下 arthas logger 命令。

@hengyunabc hengyunabc added this to the 4.0.1 milestone Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants