You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "James Pretorius (JIRA)" <ji...@apache.org> on 2014/02/18 12:00:21 UTC
[jira] [Created] (LOG4J2-541) Allow all lookup types in
DynamicThresholdFilter
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org