dcsimg
log4j RollingFileAppender overwriting existing file when using more then one process
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Eylon_Segal
Posted On:   Sunday, May 25, 2003 03:59 AM

Hi, when using one configuration for more then one instance of log4j (e.g. Application-Server + Client program), if the files are of absolute path, then RollingFileAppender overwriting existing file. I checked log4j code and it seems that the problem is that all files in configuration are opened in initialization, even if there won't be writtings to them, and that creates a problem... (I saw the problem exactly in rollOver method of RollingFileAppender) is there any way by configuration to avoid this situation? is there any flag that sign to log4j not to open appenders-files unless there will be first writting to them? (I'm using xml configuration) Thanks, Eylon Segal.    More>>

Hi,
when using one configuration for more then one instance of log4j (e.g. Application-Server + Client program), if the files are of absolute path, then RollingFileAppender overwriting existing file.
I checked log4j code and it seems that the problem is that all files in configuration are opened in initialization, even if there won't be writtings to them, and that creates a problem... (I saw the problem exactly in rollOver method of RollingFileAppender)


is there any way by configuration to avoid this situation? is there any flag that sign to log4j not to open appenders-files unless there will be first writting to them? (I'm using xml configuration)


Thanks,
Eylon Segal.

   <<Less
About | Sitemap | Contact