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 Ti...@lnotes5.bankofny.com on 2001/07/18 16:53:48 UTC
WLS server, hot-deploy, & configuring two different extended classes
BACKGROUND:
I am using Weblogic Server 6sp1. When logging in to the server it provides a
hook (the AuditProvider class) for the developers to capture the login results
and do
their own logging. This class is loaded immediately when WLS is started, so it
has
to be in the CLASSPATH of WLS.
Now, we can have many web-apps running on the server. The goal is to have any
of
these web apps hot-deployable. That is, they can't be listed in the WLS
classpath.
LOGGING REQUIREMENTS:
I want to provide logging to both the AuditProvider class (which wouldn;t be
hot-deployable)
and to any web-app (which would be hot deployable). Both would write to the
same file and
a database. I want an extra priority level (AUDIT) and a few extra fields tied
to the logging
event.
WHAT I'VE DONE SO FAR:
I've created all of my class: and extended Category, CategoryFactory, Priority,
LoggingEvent,
PatternLayout, PatternConverter. I've also extended JDBCAppender. Unit tests
all seems to work.
Each of those classes listed above was then duplicated to some extent and given
different
names, so that I could JAR up one set of them (call them WLSLoginCategory,
WLSLoginPriority,
etc) to put them in the WLS CLASSPATH (where only the AuditProvider class would
use them).
The other set would be used by the individual web app and would be
hot-deployable.
QUESTION:
Using the log4j.properties file alone, how can I properly configure this mess?
The way it works now,
the WLSLoginCategory set gets loaded as root and every class in the web-app
which uses
the other set of WebAppCategory classes craps out.
Thanks,
Tim
The information in this e-mail, and any attachment therein, is confidential and
for use by the addressee only. If you are not the intended recipient, please
return the e-mail to the sender and delete it from your computer. Although the
Bank of New York attempts to sweep e-mail and attachments for viruses, it does
not guarantee that either are virus-free and accepts no liability for any damage
sustained as a result of viruses.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Re: WLS server, hot-deploy, & configuring two different
extended classes
Posted by Robert Leftwich <di...@ix.net.au>.
At 12:53 AM 19/07/2001, Timothy_P._Grotenhuis@lnotes5.bankofny.com wrote:
>BACKGROUND:snipped
>
>QUESTION:
>
>Using the log4j.properties file alone, how can I properly configure this mess?
>The way it works now,
>the WLSLoginCategory set gets loaded as root and every class in the web-app
>which uses
>the other set of WebAppCategory classes craps out.
What do you mean by craps out?
As a stab in the dark - if you are getting a ClassCast exception then it is
probably your CategoryFactory setup. How are you specifying which
log4j.properties file to use for each of the hot-deployable apps? if you
use a fully qualified pathname then all the hot-deployed apps will be using
the same properties file as the WLSLogin... and hence using the same
CategoryFactory. The introductory manual (of the most recent release) has a
good discussion on initializing log4j in the Tomcat environment which may
be of use to you.
HTH
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org