Search code examples
javalogback

Does logback zip log rolling with compression require "zip" linux utilities to be installed?


I have Java on a container where the zip and gzip commands are not available.

I have a log rolling policy:

    <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
            <!-- rollover daily -->
            <fileNamePattern>backend-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
            <maxFileSize>100MB</maxFileSize>
            <maxHistory>60</maxHistory>
            <totalSizeCap>20GB</totalSizeCap>
    </rollingPolicy>

Does this mean that logback will fail to roll my logs appropriately? Or does it use Java zip utilities to zip the logs?


Solution

  • Verified that it does NOT require any system logrotate, zip etc. It uses Java libraries only