I have following XML configration i would like to convert to java property file.
I am getting below error
log4j:WARN Failed to set property [filter]
Properties files don't support filters. You'll have to switch to an XML configuration.
From the documentation of Filter :
Note that filtering is only supported by the DOMConfigurator. The PropertyConfigurator does not support filters.
Resources :
On the same topic :
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d %-6p [%c] %m%n
log4j.appender.console.filter.1=org.apache.log4j.varia.StringMatchFilter
log4j.appender.console.filter.1.StringToMatch=entered
log4j.appender.console.filter.1.AcceptOnMatch=true
log4j.appender.console.filter.2=org.apache.log4j.varia.DenyAllFilter
does work