In a prior life I used a subclass of RollingFileAppender which set the file name to include hours, minutes and seconds, but rolled based on size..I think if a filenamepattern was supported for the activeFileName in TimeBasedRollingPolicy, this would solve your problem...
Scott On Tue, May 4, 2010 at 2:47 AM, Peter Fuerholz <[email protected]>wrote: > Hi there, > > I have a signed WebStart application which logs defaultly into the current > user's home directory. (If I use a relative path the log file is saved > under a browser specific path which is not very user friendly.) There are > now cases where it is sensible to start this WebStart application twice or > more times. In this case, all program instances write to the same log file > which makes it very difficult to read. > > I came up with following two solutions: > - Put each log file into a session-specific path, e.g. > <home>/.<application-name>/<session-id>/<filename> > session-id must be a program instance specific identifier > - Use MDC. Distinguish the different client instances by using different > MDC-keys. > - This could be a problem using RollingFileAppender (Messages may get > messed up according older mailing list entries?) > - Produces a lot of extra data since the cases, where > 1 program > instances are running, are rather few > > Is there a default behaviour how to solve this issue? > Any help appreciated. > > Yours, > Peter
