You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by indomie15 <su...@gmail.com> on 2012/01/09 09:31:57 UTC

Log4J DailyrollingFileAppender Issue

Hi All,

I have two programs that will run concurrently to write logs into the same
log file. I am using log4j-1.2.16.jar and place log4j.xml inside my
application .jar file.

The two programs will write logs into the file for 5 minutes and I am using
DailyRollingFileAppender to rolled the log files every minutes. The problem
is the log file is not rolled over and encounter error message "failed to
rename the file...". Why is it so? 

But when I run one program only, everything is fine.

Does Log4j's DailyRollingFileAppender does not support more than one
application that run simultaneosly to log file into same destination? 

Thank you.

:D
-- 
View this message in context: http://old.nabble.com/Log4J-DailyrollingFileAppender-Issue-tp33105755p33105755.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Log4J DailyrollingFileAppender Issue

Posted by Jacob Kjome <ho...@visi.com>.
Are both applications run within the same JVM, or do you start up a separate 
JVM for the second application?  If the latter, then no, it's not supported.  
You should point to a separate file location.  This has more to do with the 
JVM than Log4j, though.  That said, I think it's possible to do using NIO.  
Search the email list for discussion of NIO and FileAppenders.

Jake

On Mon, 9 Jan 2012 00:31:57 -0800 (PST)
 indomie15 <su...@gmail.com> wrote:
> 
> Hi All,
> 
> I have two programs that will run concurrently to write logs into the same
> log file. I am using log4j-1.2.16.jar and place log4j.xml inside my
> application .jar file.
> 
> The two programs will write logs into the file for 5 minutes and I am using
> DailyRollingFileAppender to rolled the log files every minutes. The problem
> is the log file is not rolled over and encounter error message "failed to
> rename the file...". Why is it so? 
> 
> But when I run one program only, everything is fine.
> 
> Does Log4j's DailyRollingFileAppender does not support more than one
> application that run simultaneosly to log file into same destination? 
> 
> Thank you.
> 
> :D
> -- 
> View this message in context: 
>http://old.nabble.com/Log4J-DailyrollingFileAppender-Issue-tp33105755p33105755.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org