<!-- Appenders -->
<appender name="myfile" class="org.apache.log4j.FileAppender">
<param name="file" value="/log/mylog.txt"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-5p: %c - %m[%d{HH:mm:ss}]%n" />
</layout>
</appender>
<appender name="myfile2" class="org.apache.log4j.FileAppender">
<param name="file" value="/log/mylog2.html"/>
<layout class="org.apache.log4j.HTMLLayout"/>
</appender>
<!-- Root Logger -->
<root>
<priority value="warn" />
<appender-ref ref="console" />
<appender-ref ref="myfile" />
<appender-ref ref="myfile2" />
</root>
실행 결과 >>
param의 value에 설정한 경로에 해당 로그 파일이 추가된다