[logback-user] No output written to file

Donald McLean dmclean62 at gmail.com
Thu Nov 5 03:57:08 CET 2020


Hi,

I have this really confusing issue where the log file is created, but empty.

Below is the configuration I'm using (which is almost exactly the one
given in the logback manual in the section on file appenders).

Any help or suggestions on how to debug this would be much appreciated.

Donald

<configuration>
    <timestamp key="bySecond" datePattern="yyyyMMdd'T'HHmmss"/>

    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
        <file>UnitTest-${bySecond}.log</file>
        <append>true</append>
        <!-- set immediateFlush to false for much higher logging throughput -->
        <immediateFlush>true</immediateFlush>
        <!-- encoders are assigned the type
             ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
        <encoder>
            <pattern>%-4relative [%thread] %-5level %logger{35} -
%msg%n</pattern>
        </encoder>
    </appender>

    <root level="TRACE">
        <appender-ref ref="FILE" />
    </root>
</configuration>


More information about the logback-user mailing list