Log4J DailyrollingFileAppender Issue

2012-01-09 Thread indomie15

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-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Asynchronous Logging in Glassfish using log4j.AsyncAppender

2012-01-09 Thread Beer Dr. Thomas
Hello,
we would like to use Log4J's AsynchAppender within our JEE application. The 
application is deployed on a Glassfish V2 app-server.
Log4J's AsynchAppender is based on a thread implementation. Threads in turn 
should be avoided within JEE applications. Are there any experiences using the 
AsynchAppender? What are best practices doing asynchronous logging using 
Log4J in JEE applications?

I really appreciate your help.

Kind regards,
Thomas

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



Re: Log4J DailyrollingFileAppender Issue

2012-01-09 Thread Jacob Kjome


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 suigion.ander...@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-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



log4j in two different project

2012-01-09 Thread Anjib Mulepati

I have two different projects
a) One for my DAO and
b) Another for my web application.
Web application uses the DAO jar file to handle all DAO operations.
In both project I have configured the log4j.properties (lo4j-1.2.14)
file and using commons-logging 1.1.1.
When I run test code independently in DAO project I can see the log but
when I try to see the log for DAO by running my application DAO logs are
not generated I can only see the logs from my web application.
What I am doing wrong?


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



Re: log4j in two different project

2012-01-09 Thread Jacob Kjome


Are you log4j.properties files for each project identical?  My guess is that 
they are different and the config file for you webapp doesn't provide the 
configuration you require for your DAO.


BTW, is the DAO project deployed in WEB-INF/lib?  That is, is it part of the 
same classloader as the webapp.  That could be an issue as well if it is not.


Jake

On Mon, 9 Jan 2012 12:24:19 -0500
 Anjib Mulepati anji...@hotmail.com wrote:

I have two different projects
a) One for my DAO and
b) Another for my web application.
Web application uses the DAO jar file to handle all DAO operations.
In both project I have configured the log4j.properties (lo4j-1.2.14)
file and using commons-logging 1.1.1.
When I run test code independently in DAO project I can see the log but
when I try to see the log for DAO by running my application DAO logs are
not generated I can only see the logs from my web application.
What I am doing wrong?


-
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



redirecting Stdout and stderr to a different log file

2012-01-09 Thread Umesh Paliwal
Hi All,

We have lot many sysouts in our project. The sysout are captured in file by 
using a redirect operator when we launch the server.
The maintanence of the files a big issue as these logs keep on growing.

Can you please help me find out a strategy if I can redirect all the sysout and 
stderr into a logging file using log4j.

Thanks and regards,
Umesh Paliwal
The information contained in this e-mail is private  confidential and may also 
be legally privileged. If you are not the intended recipient, please notify us, 
preferably by e-mail, and do not read, copy or disclose the contents of this 
message to anyone.