Example - Log4j 2 filters

If a specific logger should not log into an appender, a custom IAM filter "LoggerFilter" can be used in the configuration.


<?xml version="1.0" encoding="UTF-8"?>

<Configuration name="Syslog Configuration">
		<Root level="${sys:iam.log.level}">
			<LoggerFilter onMatch="DENY" onMismatch="ACCEPT">
				<FilteredLogger name="NO_LOGS_OF_THIS_LOGGER"/>
				<FilteredLogger name="com.airlock.iam.login.app.misc.BaseServlet"/>
			<AppenderRef ref="CONSOLE"/>

This configuration filters all log messages from a custom logger NO_LOGS_OF_THIS_LOGGER and the logs from the class com.airlock.iam.login.app.misc.BaseServlet.