I want package com.abc.xyz to log only ERRORs to the console and INFO and above to a file. How do I give the configuration in log4j2.xml for this? Tried doing the below but didn't work.
<Loggers>
<Root level="info">
<AppenderRef ref="CONSOLE"/>
<AppenderRef ref="LOGFILE"/>
</Root>
<Logger name="com.abc.xyz">
<AppenderRef ref="LOGFILE" level="info"/>
<AppenderRef ref="CONSOLE" level="error" />
</Logger>
</Loggers>
