当前位置:网站首页>Arthas case: dynamic update application logger level
Arthas case: dynamic update application logger level
2022-07-25 02:09:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm the king of the whole stack .
source : case-ognl-update-logger-level
Case study : dynamic to update application Logger Level
In this case , Dynamically modify the applied Logger Level.
lookup UserController Of ClassLoader
sc -d com.example.demo.arthas.user.UserController | grep classLoaderHash
$ sc -d com.example.demo.arthas.user.UserController | grep classLoaderHash
classLoaderHash 1be6f5c3use ognl obtain logger
ognl –classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader ‘@[email protected]’
$ ognl --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader '@[email protected]'
@Logger[
[email protected][5454405123156820674],
[email protected][ch.qos.logback.classic.Logger],
[email protected][com.example.demo.arthas.user.UserController],
level=null,
[email protected][20000],
[email protected][Logger[com.example.demo.arthas.user]],
childrenList=null,
aai=null,
[email protected][true],
[email protected][ch.qos.logback.classic.LoggerContext[default]],
]You can know [email protected] The actual use is logback. You can see level=null, The actual final level It's from root logger From inside .
Set separately UserController Of logger level
ognl –classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader ‘@[email protected](@[email protected])’
Once again [email protected], We can see that it is DEBUG 了 :
ognl –classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader ‘@[email protected]’
$ ognl --classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader '@[email protected]'
@Logger[
[email protected][5454405123156820674],
[email protected][ch.qos.logback.classic.Logger],
[email protected][com.example.demo.arthas.user.UserController],
[email protected][DEBUG],
[email protected][10000],
[email protected][Logger[com.example.demo.arthas.user]],
childrenList=null,
aai=null,
[email protected][true],
[email protected][ch.qos.logback.classic.LoggerContext[default]],
]modify logback Overall situation logger level
ognl –classLoaderClass org.springframework.boot.loader.LaunchedURLClassLoader ‘@[email protected](“root”).setLevel(@[email protected])’
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/120963.html Link to the original text :https://javaforall.cn
边栏推荐
- About the relationship between parent process and child process (UAC bypass idea)
- Create the first hbuilder project
- xts performance auto fix script
- Use SAP ui5 application to consume create and delete operations of OData in business application studio
- Alibaba cloud released the white paper "upgrade - standardization of data warehouse upgrade delivery"
- Download files and web pages with WGet
- See you in Suzhou! "Cloud Intelligence Technology Forum - industry special" will be held soon
- July 8, 2022
- Focus on improving women's and children's sense of gain, happiness and security! In the next ten years, Guangzhou Women's and children's undertakings will make such efforts
- Standard transfer function
猜你喜欢

JVM Foundation

Full analysis of new functions of report design tool FastReport online designer v2022.1

Vs2019 configuring Qt5 development environment

Dynamic memory development

The cloud ecology conference comes with the "peak"!

Simulate the implementation of StrCmp function

Academicians said: researchers should also support their families. They can only do short-term and fast research if they are not promoted

6-10 vulnerability exploitation SMTP experimental environment construction
Windows Server 2022 received a non security update in July: fix the sticking problem caused by defender

Multithreading and high concurrency (II) -- synchronized locking and unlocking process
随机推荐
xts performance auto fix script
Failed to create data snapshot: lock file [/siyuan/data/assets/image- 2022070216332-jijwccs.png failed: open /siyuan/data/assets/image- 2022070216332-jijwccs.png: permission denied; unable to lock fil
Nacos service discovery data model
[summer daily question] Luogu p1605 maze
Several application scenarios of NAT
[summer daily question] output of Luogu p1157 combination
The cloud ecology conference comes with the "peak"!
Full analysis of new functions of report design tool FastReport online designer v2022.1
Agreement on sharing agricultural scientific data in China
[summer daily question] Luogu P7550 [coci2020-2021 6] bold
Industrial control safety PLC firmware reverse III
2022/7/18-7/19
Create the first hbuilder project
BMW I3 based on clar architecture is not a simple "oil to electricity" product
Redis tutorial
Download files and web pages with WGet
[system design] distributed key value database
Scalar, vector, matrix calculus
Performance analysis method - Notes on top of performance
6-10 vulnerability exploitation SMTP experimental environment construction