我的log4j2日志文件总是每行都有双精度输出。我该如何阻止重复?
2022-09-01 22:36:08
我的log4j2日志文件总是每行都有双精度输出。我该如何阻止重复?
<?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>