Ali online diagnosis tool Arthas how to adjust the log level record
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!