Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Ali online diagnosis tool Arthas how to adjust the log level record

Shulou Source: shulou.com Published: 2022-06-02 02:28:01 10月03日 Update

Ali online diagnostic tool Arthas how to adjust the log level records, I believe that many inexperienced people are helpless about this, this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

Ali's open source Java diagnostic tool Arthas can adjust log levels online

Find classloader hashcode for current class

sc -d com.example.demo.arthas.user.UserController | grep classLoaderHash

Get logger with OGNL

ognl -c 1be6f5c3 '@com.example.demo.arthas.user.UserController@logger'

Set UserController logger level separately

ognl -c 1be6f5c3 '@com.example.demo.arthas.user.UserController@logger.setLevel(@ch.qos.logback.classic.Level@DEBUG)'

Set logger level globally

ognl -c 1be6f5c3 '@org.slf4j.LoggerFactory@getLogger("root").setLevel(@ch.qos.logback.classic.Level@DEBUG)' After reading the above contents, have you mastered how to adjust the log level record of Ali online diagnostic tool Arthas? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!

Tags: Tools levels Ali online adjustments logs content methods more problems helpless for this overall situation reasons skills articles experience industry information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Tech Info Microsoft Shulou Information vpn