My log4j2 log file always has double output of each line. How can I stop the duplication please?
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<properties>
<property name="name">CernerPharmacyWebApp</property>
<property name="pattern">%d %-5p %C{2} (%F:%L) - %m%n</property>
</properties>
<Appenders>
<Console name="CONSOLE" target="SYSTEM_OUT">
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout>
<pattern>${pattern}</pattern>
</PatternLayout>
</Console>
<RollingFile name="ROLLING_FILE" fileName="..\logs\${name}.log"
filePattern="..\logs\${name}-%d{yyyy-MM-dd}-%i.log">
<PatternLayout>
<pattern>${pattern}</pattern>
</PatternLayout>
<Policies>
<TimeBasedTriggeringPolicy/><!-- Rotated everyday -->
<SizeBasedTriggeringPolicy size="50 MB"/> <!-- Or every 50 MB -->
</Policies>
</RollingFile>
</Appenders>
<Loggers>
<Root level="error">
<!-- <AppenderRef ref="CONSOLE"/> -->
<AppenderRef ref="ROLLING_FILE"/>
</Root>
<!-- Controls packages -->
<Logger name="com.jarmel.pharmacy.controls.BarCodeOrderServlet" level="trace">
<!-- <AppenderRef ref="CONSOLE"/> -->
<AppenderRef ref="ROLLING_FILE"/>
</Logger>
<Logger name="com.jarmel.pharmacy.controls.GetCodeValues" level="error">
<!-- <AppenderRef ref="CONSOLE"/> -->
<AppenderRef ref="ROLLING_FILE"/>
</Logger>
<Logger name="com.jarmel.pharmacy.controls.GetPersonnelServlet" level="error">
<!-- <AppenderRef ref="CONSOLE"/> -->
<AppenderRef ref="ROLLING_FILE"/>
</Logger>
</Loggers>
</Configuration>
Blockquote