[logback-user] Problem with FileNamePattern that includes ${user.home} on windows

Michel Collette mvcollette at gmail.com
Mon Jun 9 03:27:22 CEST 2008


I'm been unsuccessful at using the RollingFileAppender with a
FixedWindowRollingPolicy that has this FileNamePattern:


"${user.home}/Client%i.log" gets correctly expanded to "C:\\Documents and
Settings\\Michel/Client%i.log" when it's passed to the
FixedWindowRollingPolicy constructor.

The problem starts once the filename gets parsed by
ch.qos.logback.core.pattern.parser.Parser: the filename becomes "C:ocuments
and Settingsichel/Client".

File rotations then fails (as would be expected) when trying to rename the
current log to "C:ocuments and Settingsichel/Client1.log"

Is there a way to configure logback to correctly deal with the "\\" used in

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://qos.ch/pipermail/logback-user/attachments/20080608/5eedaa56/attachment.htm 

More information about the Logback-user mailing list