当前位置:网站首页>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
边栏推荐
- [hero planet July training leetcode problem solving daily] 20th BST
- Today in history: the kotlin language was published for the first time; The father of the IMAP agreement was born; CT imaging achieves a new breakthrough
- CSRF attack principle scenario
- iptables :chains, target
- SetTimeout parameters [easy to understand]
- How MySQL 8.0 based on TRX_ Id find the statement of the whole transaction
- Detailed explanation of the principles and differences between static pages and dynamic pages
- Unable to display spline in UE4 (unreal engine4) terrain editing tool
- Computing network, AI first, shengteng AI helps operators' Digital Transformation -- work together to win-win Computing Era
- From casting sword to defending sword: the way to build the efficiency platform of didi project
猜你喜欢

"Ask the sky" is in place! Yu Jingchuan's "China Space Station" in 2013 is about to set sail in the sea of stars

Eolink - quickly develop interfaces through document driven
![[leetcode] 3. Longest substring without repeated characters - go language problem solution](/img/63/57d3557d77d44b51b7d0f71669568f.png)
[leetcode] 3. Longest substring without repeated characters - go language problem solution

"I gave up programming and wrote a 1.3 million word hard science fiction."

Scalar, vector, matrix calculus

Start to build a three node Eureka cluster

R language uses logistic regression, ANOVA, outlier analysis and visual classification iris iris data set

2022.7.20 linear table
![Simulation Implementation of [STL] string class](/img/be/2e4f8dd7da59753e109b38fdf51fba.png)
Simulation Implementation of [STL] string class
![[leetcode] 2. Add two numbers - go language problem solving](/img/26/9b5df9aedc34238ce816cbf8e72066.png)
[leetcode] 2. Add two numbers - go language problem solving
随机推荐
Scientific data center resources and user access control system
How can arm access the Internet through a laptop?
CSRF attack principle scenario
Rightmost × Microframe, high quality heif image coding and compression technology
Agreement on sharing agricultural scientific data in China
Actf questions (dropper+master_of_dns)
[programmer interview classic] 01.09 string rotation
Today in history: the kotlin language was published for the first time; The father of the IMAP agreement was born; CT imaging achieves a new breakthrough
Google launched another "man grabbing war" for core making, and Intel's 17 year veteran joined!
Vs2019 configuring Qt5 development environment
Server performance monitoring
PostgreSQL views tables, table indexes, views, table structures, and parameter settings
[leetcode] 3. Longest substring without repeated characters - go language problem solution
2022.7.20 linear table
Download files and web pages with WGet
What do growth enterprises need most to build a data-driven organization?
Open source demo | release of open source example of arcall applet
"I gave up programming and wrote a 1.3 million word hard science fiction."
Gerrit statistics script
[summer daily question] Luogu p1706 full ranking question