Add log4j2-levels module: threshold rule, inheritance, additivity, custom levels, Actuator runtime changes and argument evaluation on Spring Boot 4.1.2 / Log4j2 2.25.5, with real transcripts
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b5SFkZoaMCukJNvZCV
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
fe3fc689a6
commit
c9a2b766bb
@@ -0,0 +1,36 @@
|
||||
# every registered level, most severe first (OFF and ALL left out)
|
||||
FATAL 100
|
||||
ERROR 200
|
||||
WARN 300
|
||||
DIAG 350
|
||||
INFO 400
|
||||
PERF 450
|
||||
DEBUG 500
|
||||
TRACE 600
|
||||
|
||||
# lookups
|
||||
Level.getLevel("DIAG") = DIAG
|
||||
Level.getLevel("NOPE") = null
|
||||
Level.forName("DIAG", 999) = DIAG (intLevel 350)
|
||||
|
||||
# which of DIAG and PERF are enabled at each threshold
|
||||
threshold DIAG PERF
|
||||
WARN - -
|
||||
DIAG yes -
|
||||
INFO yes -
|
||||
PERF yes yes
|
||||
DEBUG yes yes
|
||||
|
||||
# logger configured in XML with level="diag" (lower case)
|
||||
ERROR yes
|
||||
WARN yes
|
||||
DIAG yes
|
||||
INFO -
|
||||
PERF -
|
||||
DEBUG -
|
||||
|
||||
# UserService.diagnose() with the service package at DEBUG: both custom lines print
|
||||
DIAG c.a.l.s.UserService - cache size = 42
|
||||
PERF c.a.l.s.UserService - lookup took 3 ms
|
||||
# and with it at INFO: only DIAG prints
|
||||
DIAG c.a.l.s.UserService - cache size = 42
|
||||
Reference in New Issue
Block a user