public class MdcOrJndiPropertyFilter extends JndiPropertyFilter
This filter tries to retrieve the property value by the name from the log4j MDC. If not found from MDC, then it tries to retrieve the property value by the name from the JNDI resources.
Exammple configuration is:CONTAINER_PREFIX
Constructor and Description |
---|
MdcOrJndiPropertyFilter() |
Modifier and Type | Method and Description |
---|---|
protected String |
getProperty(org.apache.log4j.spi.LoggingEvent event,
String key)
Finds the property value by the name from the underlying environment.
|
isResourceRef, setResourceRef
decide, getName, getOnMatch, getOnMatchOption, getValue, setName, setOnMatch, setOnMatchOption, setValue
protected String getProperty(org.apache.log4j.spi.LoggingEvent event, String key)
AbstractPropertyFilter
getProperty
in class JndiPropertyFilter
Copyright © 2012–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.