[logback-user] RollingFileAppender not writing to disk...

grosin at cox.net grosin at cox.net
Mon Jul 27 02:22:20 CEST 2020


Using logback 1.2.3 in Spring Boot 2.3.2. What I'm seeing is that upon
startup, the file is created with size 0 and doesn't flush. The default
buffer size is 8k, no? Shouldn't it flush every 8k? If I close my app, then
the logfile is written (about 17k). Logback-spring.xml is below. This is on
Windows 10 x64.

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE configuration>

<configuration>

       <include resource="org/springframework/boot/logging/logback/base.xml"
/>

       <appender name="FILE"
class="ch.qos.logback.core.rolling.RollingFileAppender">

              <file>${LOG_PATH}/${LOG_FILE}.log</file>

              <rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">

 
<fileNamePattern>${LOG_PATH}/${LOG_FILE}.%d{yyyy-MM-dd}.log</fileNamePattern
>

                     <maxHistory>7</maxHistory>

              </rollingPolicy>

              <encoder>

                     <pattern>${FILE_LOG_PATTERN}</pattern>

              </encoder>

       </appender>

       <root level="INFO">

              <appender-ref ref="CONSOLE" />

              <appender-ref ref="FILE" />

       </root>

</configuration>

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20200726/1cd71e42/attachment.html>


More information about the logback-user mailing list