Hi i am new using log4j
I am trying to configure the xml to send those logging into the log file using the and appender, well, the appender works fine so i want to use appender so that it will clear the log file daily, but when it first created the log file, it doesn't write any log message into the file created by , so i come here to get some advise
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="FATAL" >
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="${pattern}" />
</Console>
<RollingFile name="rollingfile" fileName="rolling.log"
filePattern="rolling-%d{MM-dd-yyyy}.log">
<PatternLayout pattern="${pattern}" />
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true" />
<SizeBasedTriggeringPolicy size="10 MB" />
</Policies>
</RollingFile>
<File name="file" fileName="test2.log">
<PatternLayout pattern="${pattern}" />
</File>
</Appenders>
<Loggers>
<Root level="trace" >
<AppenderRef ref="Console" />
<AppenderRef ref="rollingfile" />
<AppenderRef ref="file" />
</Root>
</Loggers>
</Configuration>