'DailyRollingFileAppender' problem - two process, one log4j.properties file
Hi everydoby I'm having a extrange behaviour with a log4j configuration. I have two different process running from two different java virtual machines. Both of then read their log4j configuration from the same configuration file: -- log4j.rootCategory=DEBUG log4j.logger.FileChecker=DEBUG,FileChecker log4j.logger.AlertChecker=DEBUG,AlertChecker # # FileChecker is a DailyRollingFileAppender # log4j.appender.FileChecker=org.apache.log4j.DailyRollingFileAppender log4j.appender.FileChecker.file=./log/mylogRecibir.log log4j.appender.FileChecker.datePattern='.'-MM-dd log4j.appender.FileChecker.append=true log4j.appender.FileChecker.layout=org.apache.log4j.PatternLayout log4j.appender.FileChecker.layout.ConversionPattern=[%c] %-5p %d{ISO8601} - %m%n # # AlertChecker is a DailyRollingFileAppender # log4j.appender.AlertChecker=org.apache.log4j.DailyRollingFileAppender log4j.appender.AlertChecker.file=./log/mylogSend.log log4j.appender.AlertChecker.datePattern='.'-MM-dd log4j.appender.AlertChecker.append=true log4j.appender.AlertChecker.layout=org.apache.log4j.PatternLayout log4j.appender.AlertChecker.layout.ConversionPattern=[%c] %-5p %d{ISO8601} - %m%n -- (in both of the process java code I do: private static Logger logger = Logger.getLogger(AlertChecker); . PropertyConfigurator.configure(IPegasoProperties.IPEGASO_PROPERTIES_FILE); //the logj4j configuration file ) It happens that when day changes old logging files are not renamed properly; instead they are overwritten. Also, when log files are from an older day (process are stopped); the first process I start roll the log file properly, but the second overwrite his log (don't do the roll). I'm tested new versions and log4j and the problem is the same. Could anybody help me? -- View this message in context: http://www.nabble.com/%27DailyRollingFileAppender%27-problem---two-process%2C-one-log4j.properties-file-tp22537011p22537011.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
AW: [SPAM (Bayesain Analysis)] - 'DailyRollingFileAppender' problem - two process, one log4j.properties file - Bayesian Filter detected spam
Two JVM logging to the same file is a MUST NOT. Heri -Ursprüngliche Nachricht- Von: yokese [mailto:fastturtle...@gmail.com] Gesendet: Montag, 16. März 2009 13:35 An: log4j-user@logging.apache.org Betreff: [SPAM (Bayesain Analysis)] - 'DailyRollingFileAppender' problem - two process, one log4j.properties file - Bayesian Filter detected spam Hi everydoby I'm having a extrange behaviour with a log4j configuration. I have two different process running from two different java virtual machines. Both of then read their log4j configuration from the same configuration file: -- log4j.rootCategory=DEBUG log4j.logger.FileChecker=DEBUG,FileChecker log4j.logger.AlertChecker=DEBUG,AlertChecker # # FileChecker is a DailyRollingFileAppender # log4j.appender.FileChecker=org.apache.log4j.DailyRollingFileAppender log4j.appender.FileChecker.file=./log/mylogRecibir.log log4j.appender.FileChecker.datePattern='.'-MM-dd log4j.appender.FileChecker.append=true log4j.appender.FileChecker.layout=org.apache.log4j.PatternLayout log4j.appender.FileChecker.layout.ConversionPattern=[%c] %-5p %d{ISO8601} - %m%n # # AlertChecker is a DailyRollingFileAppender # log4j.appender.AlertChecker=org.apache.log4j.DailyRollingFileAppender log4j.appender.AlertChecker.file=./log/mylogSend.log log4j.appender.AlertChecker.datePattern='.'-MM-dd log4j.appender.AlertChecker.append=true log4j.appender.AlertChecker.layout=org.apache.log4j.PatternLayout log4j.appender.AlertChecker.layout.ConversionPattern=[%c] %-5p %d{ISO8601} - %m%n -- (in both of the process java code I do: private static Logger logger = Logger.getLogger(AlertChecker); . PropertyConfigurator.configure(IPegasoProperties.IPEGASO_PROPERTIES_FILE); //the logj4j configuration file ) It happens that when day changes old logging files are not renamed properly; instead they are overwritten. Also, when log files are from an older day (process are stopped); the first process I start roll the log file properly, but the second overwrite his log (don't do the roll). I'm tested new versions and log4j and the problem is the same. Could anybody help me? -- View this message in context: http://www.nabble.com/%27DailyRollingFileAppender%27-problem---two-process%2C-one-log4j.properties-file-tp22537011p22537011.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org
Re: AW: [SPAM (Bayesain Analysis)] - 'DailyRollingFileAppender' problem - two process, one log4j.properties file - Bayesian Filter detected spam
Sorry maybe I haven't explain it correctly. Each process log to a different file (mylogRecibir.log and mylogSend.log). And each one use one appender (FileChecker and AlertChecker). The only common is the log configuration file that i'd like to be only one. Using two log configuration files there's no problem. It seems to be a log4j bug or a missunderstanding by my side of log4j principles.But, well all works fine except the DailyRollingFileAppender or log files. Bender Heri wrote: Two JVM logging to the same file is a MUST NOT. Heri -Ursprüngliche Nachricht- Von: yokese [mailto:fastturtle...@gmail.com] Gesendet: Montag, 16. März 2009 13:35 An: log4j-user@logging.apache.org Betreff: [SPAM (Bayesain Analysis)] - 'DailyRollingFileAppender' problem - two process, one log4j.properties file - Bayesian Filter detected spam Hi everydoby I'm having a extrange behaviour with a log4j configuration. I have two different process running from two different java virtual machines. Both of then read their log4j configuration from the same configuration file: -- log4j.rootCategory=DEBUG log4j.logger.FileChecker=DEBUG,FileChecker log4j.logger.AlertChecker=DEBUG,AlertChecker # # FileChecker is a DailyRollingFileAppender # log4j.appender.FileChecker=org.apache.log4j.DailyRollingFileAppender log4j.appender.FileChecker.file=./log/mylogRecibir.log log4j.appender.FileChecker.datePattern='.'-MM-dd log4j.appender.FileChecker.append=true log4j.appender.FileChecker.layout=org.apache.log4j.PatternLayout log4j.appender.FileChecker.layout.ConversionPattern=[%c] %-5p %d{ISO8601} - %m%n # # AlertChecker is a DailyRollingFileAppender # log4j.appender.AlertChecker=org.apache.log4j.DailyRollingFileAppender log4j.appender.AlertChecker.file=./log/mylogSend.log log4j.appender.AlertChecker.datePattern='.'-MM-dd log4j.appender.AlertChecker.append=true log4j.appender.AlertChecker.layout=org.apache.log4j.PatternLayout log4j.appender.AlertChecker.layout.ConversionPattern=[%c] %-5p %d{ISO8601} - %m%n -- (in both of the process java code I do: private static Logger logger = Logger.getLogger(AlertChecker); . PropertyConfigurator.configure(IPegasoProperties.IPEGASO_PROPERTIES_FILE); //the logj4j configuration file ) It happens that when day changes old logging files are not renamed properly; instead they are overwritten. Also, when log files are from an older day (process are stopped); the first process I start roll the log file properly, but the second overwrite his log (don't do the roll). I'm tested new versions and log4j and the problem is the same. Could anybody help me? -- View this message in context: http://www.nabble.com/%27DailyRollingFileAppender%27-problem---two-process%2C-one-log4j.properties-file-tp22537011p22537011.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org -- View this message in context: http://www.nabble.com/AW%3A--SPAM-%28Bayesain-Analysis%29%27DailyRollingFileAppender%27-problem---two-process%2C-one-log4j.properties-file---Bayesian-Filter-detected-spam-tp22537312p22541441.html Sent from the Log4j - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org