James Pretorius created LOG4J2-541:
--------------------------------------
Summary: Allow all lookup types in DynamicThresholdFilter
Key: LOG4J2-541
URL: https://issues.apache.org/jira/browse/LOG4J2-541
Project: Log4j 2
Issue Type: Improvement
Components: Filters
Affects Versions: 2.0-rc1
Environment: Windows 7
Java 6
Reporter: James Pretorius
Currently the DynamicThresholdFilter only supports key values pairs in the
ThreadContextMap. It would be good to see this expanded to include all log4j2
lookups.
In the below example the threshold level would be stored in a map value
substituted at runtime.
{code:javascript|title=log4j2.json snippet}
"root":{
"AppenderRef":{
"ref":"Console Appender",
"DynamicThresholdFilter":{
"defaultThreshold":"debug",
"key":"$${map:log.console.level}",
"onMatch":"ACCEPT",
"onMisMatch":"DENY",
"keyValuePair":[
{
"key":"off",
"value":"off"
},
{
"key":"fatal",
"value":"fatal"
},
{
"key":"error",
"value":"error"
},
{
"key":"warn",
"value":"warn"
},
{
"key":"info",
"value":"info"
},
{
"key":"debug",
"value":"debug"
},
{
"key":"trace",
"value":"trace"
}
]
}
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]