java - What is the equivalent of DenyAllFilter in log4j2 -


i migrating application log4j log4j2.

below code snippet log4j related , there filter denyallfilter added.

<appender name="test_file" class="org.apache.log4j.rollingfileappender">   ...   ...   <filter class="com.test.it.modefilter">       <param name="mode" value="test" />       <param name="deny" value="false" />   </filter>   <filter class="org.apache.log4j.varia.denyallfilter"/> </appender> 

should denyallfilter defined in log4j2 ? if so, equivalent of denyallfilter inlog4j2 can added in rollingfile under log4j2.xml mentioned below.

<rollingfile="test_file" other sttributes ...>   ...   ... <modefilter name="modefilter" other attributes ... /> ??? equivalent of denyallfilter??? 

please help. thanks.

according docs, denyallfilter can used switch default "accept unless instructed otherwise" filtering behaviour "deny unless instructed otherwise" behaviour.

there no direct equivalent in log4j 2. since need rewrite custom modefilter log4j 2 plugin anyway, may want change accept/reject conditions filter instead.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -