Hi Dirk Although your first assumption is correct, the things are a little bit more complicated (like always ;) ).
1. The mentioned "server app" is in fact 3 server apps, which rely on a common framework. Additionally quite a lot of tools rely on certain parts of this framework, so I don't have a single entry point, where I can delete the ghost files. I would have to delete a ghost file there where I set the new filename. 2. Using system properties does not work. The server starts sub applications depending on entries within a DB, each sub-application should have its own logging universe, but using the same configuration file (xml). All this happens on the same system. I can imagine two convenient ways to get rid of this ghost files. The first one needs a "isFileCreated" flag, the second one looks like hack. I would prefer the first one: - a logging file is created only when it is used the first time (maybe dependent on a new boolean property LazyFileCreation?). - a file appender deletes the already created file if a new filename is set and the original file is empty. Both solutions had to be done within the log4j library. Would it be an option to implement such a feature in future versions? Heri > -----Original Message----- > From: OOMS DIRK [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 07, 2005 4:36 PM > To: 'Log4J Users List' > Subject: RE: File-Appender: Empty Ghost files > > > Heri, > > I assume the overriding of the filename happens after the > client does the > standard log4j configuration, so log.log is created anyway before you > programmatically intervene. You could also programmatically > delete log.log. > > Suggestion: a (cleaner?) alternative for 'overriding the > filename' is to use > System Properties in the log4j configuration and set a > different value for > that System Proprty in each client. > > dirk > > > -----Original Message----- > > From: Bender Heri [mailto:[EMAIL PROTECTED] > > Sent: donderdag 7 april 2005 14:43 > > To: [email protected] > > Subject: File-Appender: Empty Ghost files > > > > > > Hi all > > > > I have a server application which can serve multiple clients. > > The logging occurs in files separated by client. (BTW: This > > is accomplished by supplying a own RepositorySelector which > > uses certain values in MDC). > > > > Therefore the file name within the configurtion file > > (DailyRollingFileAppender) only denotes the (root-) file name > > which is overridden in code while initializing the loggers. > > > > The problem is now, that the LogManager on it's own > > initialization creates the file which is declared within the > > configuration file (<param name="file" value="log.log"/>). > > This file is never used afterwards. I would like to avoid the > > creation of this file. > > > > I am using version 1.2.8 > > > > TIA > > > > Heri > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
