<div dir="ltr"><div class=""><div id="description-val" class="">
<div class="">
<p>Hello guys,</p><p><br></p><p>I am using tomcat server, maven, spring framework and logback.</p>
<p>I'm trying to use RollingFileAppender but I have a big problem. I
need to log the contents of a web service request that is logged as
system.out. When I start the server logs everything normally, both logs
using org.slf4j.LoggerFactory as system.out, but when you turn the log
at midnight, it generates a backup of the old log and created a new log.
This process is ok, but this new log, after the turn does not allow
loggin with system.out and therefore fails to logging the webservice request and response.</p>
<p>Below is my logback:</p><p><configuration scan="true" scanPeriod="30 seconds"></p><p><property name="LOG_PATH" value="${TOMCAT_HOME}/logs" /><br><property name="LOG_PATH_BACKUP" value="${TOMCAT_HOME}/logs/backup" /><br><br><appender name="SERVER" class="ch.qos.logback.core.rolling.RollingFileAppender"><br><file>${LOG_PATH}/server.log</file><br><rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"><br><!-- rollover daily --><br><FileNamePattern>${LOG_PATH_BACKUP}/server/server.%d{yyyy-MM-dd}.log.gz</FileNamePattern><br></rollingPolicy><br><encoder><br><Pattern>%green(%d) %highlight(%-5level) %cyan(%logger{0}) mdc=%X{id}%msg %n</Pattern><br></encoder><br></appender><br><br><root level="INFO"><br><appender-ref ref="SERVER" /><br></root><br></configuration></p><p>What can I do to solve this problem, please?</p><p><br></p><p><br></p>
</div>
</div>
</div><div><div class="gmail_signature">---------------------------<br>Att,<br>Giovani Schram<br>---------------------------</div></div>
</div>