当前位置:网站首页>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
边栏推荐
- Remove & lt; li> Front blank distance
- Peripherals: interrupt system of keys and CPU
- "Nowadays, more than 99.9% of the code is garbage!"
- A bit of knowledge - websites about scripts
- Beijing Zhun electric clock, Beidou clock server, GPS network time server, NTP satellite timing system
- 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
- These 11 chrome artifacts are extremely cool to use
- Codeforces:d1. choosing carrots (easy version) [max min problem + control one side to make the other side as close as possible + thinking]
- Several application scenarios of NAT
- Application status of typical marine environmental observation data products and Its Enlightenment to China
猜你喜欢
![[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

DNA helped solve the outstanding case 30 years ago. The suspect strangled his girlfriend because he fell in love with his roommate. He was already the CEO of the technology company when he was arreste

BMW I3 based on clar architecture is not a simple "oil to electricity" product

Peripherals: interrupt system of keys and CPU
![[linear DP] Digital triangle](/img/8c/f7392733ef8e13b20c394da8b4c403.png)
[linear DP] Digital triangle

I was forced to graduate by a big factory and recited the eight part essay in a two-month window. Fortunately, I went ashore, otherwise I wouldn't be able to repay the mortgage

2022.7.20 linear table

Upgrade the leapfrog products again, and the 2023 Geely Xingrui will be sold from 113700 yuan

Hongmeng harmonyos 3 official announcement: officially released on July 27; Apple slowed down the recruitment and expenditure of some teams in 2023; Russia fined Google 2.6 billion yuan | geek headlin

C#/VB. Net insert watermark in word
随机推荐
Remove & lt; li> Front blank distance
DotNetCore. Cap notes
From casting sword to defending sword: the way to build the efficiency platform of didi project
An article explains unsupervised learning in images in detail
Several application scenarios of NAT
Android memory optimized disk cache
Beijing Zhun electric clock, Beidou clock server, GPS network time server, NTP satellite timing system
Inventory of well-known source code mall systems at home and abroad
[summer daily question] Luogu P7550 [coci2020-2021 6] bold
SetTimeout parameters [easy to understand]
Peripherals: timer, watchdog and RTC
Safety management and application of genomic scientific data
Win10 configuring CUDA and cudnn
Agreement on sharing agricultural scientific data in China
ASP. Net core 6 framework unveiling example demonstration [01]: initial programming experience
BMW I3 based on clar architecture is not a simple "oil to electricity" product
Academicians said: researchers should also support their families. They can only do short-term and fast research if they are not promoted
Talk about resume optimization and interview skills of algorithm post!
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
Redis learning notes (2) - power node of station B