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>

 

 

_______________________________________________
logback-user mailing list
logback-user@qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-user

Reply via email to