Vote count:
0
This is my log4j.xml file. The file isn't being created and i don't know why, but I can see the log messages on the console.
Is there anything missing? Is there something I should remove?
Thanks for taking a look and have a nice day.
<!-- Appenders -->
<appender name="console" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%-5p: %c - %m%n" />
</layout>
</appender>
<appender name="file" class="org.apache.log4j.RollingFileAppender">
<param name="append" value="true" />
<param name="maxFileSize" value="10MB" />
<param name="maxBackupIndex" value="10" />
<param name="file" value="${catalina.home}/logs/paquitoelchocolatero.log" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n" />
</layout>
</appender>
<!-- Application logger -->
<logger name="springapp">
<level value="info" />
</logger>
<!-- 3rdparty Loggers -->
<logger name="org.springframework.beans">
<level value="warn" />
</logger>
<logger name="org.springframework.jdbc">
<level value="warn" />
</logger>
<logger name="org.springframework.transaction">
<level value="warn" />
</logger>
<logger name="org.springframework.orm">
<level value="warn" />
</logger>
<logger name="org.springframework.web">
<level value="warn" />
</logger>
<logger name="org.springframework.webflow">
<level value="warn" />
</logger>
<!-- Root Logger -->
<root>
<priority value="debug" />
<appender-ref ref="console" />
<appender-ref ref="file" />
</root>
asked 32 secs ago
Log4j file not being created in spring
Aucun commentaire:
Enregistrer un commentaire