AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with logging in TopLink with Log4J

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
Jason Fletcher
Guest





PostPosted: Wed Apr 14, 2004 11:40 pm    Post subject: Problem with logging in TopLink with Log4J Reply with quote



OK, here is the problem...

We have a Java web application running in JBoss with Toplink as our
persistence layer. We are trying to modify the logging for the
application. As JBoss uses Log4J already and we are pleased with it,
we are using Log4J for our application's logging as well. We are using
a DailyRollingFileAppender setup to roll every day. This works fine,
however, on initialization we have specified the log4J file writer as
the log writer for Toplink. This works great for one day, until the
file rolls. I believe that Log4J is closing the writer, renaming the
file, creating a new file and opening a writer to the new file (not
necessarily in that order.) This leaves Toplink without a valid writer
and it appears to be swallowing the error so that the database queries
are no longer logged to the file.

Question:

Is there a way to capture the rolling file event from Log4J so that we
can manually reconfigure TopLink's logging?

We would like to avoid manually rolling the file as that code has
already been written in Log4J, but if that is the only option.

Second Question:

Is it possible to dynamically reconfigure TopLink's log output at
runtime, using the Session object from TopLink?

Thanks for your help in advance.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.