<div dir="ltr">Hi Ceki,<div>Thanks for the answer. </div><div>Now I got success proceding like you suggested on preliminary tests. Tomorrow I can confirm it.</div><div><br></div><div>Thanks a lot</div><div>Douglas</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-14 13:00 GMT-03:00 Ceki Gulcu <span dir="ltr"><<a href="mailto:ceki@qos.ch" target="_blank">ceki@qos.ch</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Hi Douglas,<br>
<br>
<br>
The <file> property is optional RollingFileAppender. Without it, RollingFileAppender will behave in the way you want.<br>
<br>
Try the following:<span class=""><br>
<br>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"><br>
<br></span>
 <rollingPolicy<br>
  class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"><br>
    <fileNamePattern./log/%d{MMdd}/gp2b.log</fileNamePattern><br>
    <maxHistory>30</maxHistory><br>
 </rollingPolicy><span class=""><br>
 <encoder><br>
    <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36}:%L - %msg%rEx{10}%n</pattern><br>
 </encoder><br>
</appender><br>
<br></span>
Let us know how it goes.<br>
<br>
--<br>
Ceki<div><div class="h5"><br>
<br>
<br>
<br>
On 6/14/2016 17:14, Douglas Moraes wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi,<br>
<br>
I want to save my log file in a directory accordingly the current day.<br>
For example, if today is 0614 (June 14th), all log events will go to a<br>
folder 0614, and tomorrow I want the logs to go to 0615.<br>
<br>
I don´t want use rolling policy. I mean, I want the file to be directly<br>
created in the right place, and not saved in a temporary place and in<br>
other day to be saved in an archive place.<br>
<br>
I tryed:<br>
<br>
<configuration><br>
    <timestamp key="DIR" datePattern="MMdd" /><br>
    <appender name="FILE"<br>
class="ch.qos.logback.core.rolling.RollingFileAppender"><br>
        <file>./log/${DIR}/gp2b.log</file><br>
        <rollingPolicy<br>
class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"><br>
            <fileNamePattern>app.%i.log</fileNamePattern><br>
            <minIndex>1</minIndex><br>
            <maxIndex>10</maxIndex><br>
        </rollingPolicy><br>
        <triggeringPolicy<br>
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"><br>
            <maxFileSize>5MB</maxFileSize><br>
        </triggeringPolicy><br>
        <encoder><br>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36}:%L<br>
- %msg%rEx{10}%n</pattern><br>
        </encoder><br>
    </appender><br>
<br>
    <logger name="com.ocs.ProxyHttp.gp2b" level="DEBUG" /><br>
<br>
    <root level="DEBUG"><br>
        <appender-ref ref="FILE" /><br>
    </root><br>
</configuration><br>
<br>
<br>
Thanks,<br>
Douglas<br>
<br>
<br></div></div>
_______________________________________________<br>
logback-user mailing list<br>
<a href="mailto:logback-user@qos.ch" target="_blank">logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" rel="noreferrer" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br>
<br>
</blockquote>
_______________________________________________<br>
logback-user mailing list<br>
<a href="mailto:logback-user@qos.ch" target="_blank">logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" rel="noreferrer" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a></blockquote></div><br></div>