J
Jason Fletcher
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.
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.