I have a Java application that has to write it's logfiles to a write-only filesystem. The current logging configuration has a TimeBasedRollingPolicy that rolls over every day. Unfortunately, the rollover fails on the write-only filesystem since a rename is not allowed.
Is it possible to configure Logback, so that it creates the logfiles with the name that already includes the date pattern?
Ok, that was easy. All I had to do was remove the file element from the appender. Changing the configuration from this:
to this
By leaving out the file-element, the TimeBasedRollingPolicy simply uses the name configured in the fileNamePattern element and doesn't rename on rollover.