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 Sumit Mishra <su...@cash-tech.com> on 2002/02/06 07:03:31 UTC

RE: Best pratice for using Log4j, EJB, Struts, and WebLogic 6.1 t ogether

Hi,

Actually we also have a very similar scenario at our end.
We are using WebSphere 3.5, JSPs and log4j. 
In JSPs we want to put logging messages. We have written a wrapper class
whose APIs are used in all the JSPs. But we have want to create separate log
files for web app and the backend. Currently backend is forming its own log
file. But the web app hasn't done that yet. We are actually not really aware
of all the steps/config involved for doing so. Can you please tell me the
exact steps for doing so?
Thanks
Regards,
Sumit Mishra
sumit.mishra@cash-tech.com
http://www.cash-tech.com/

-----Original Message-----
From: Log4J Users List [mailto:log4j-user@jakarta.apache.org]
Sent: Tuesday, February 05, 2002 11:58 PM
To: log4j-user@jakarta.apache.org
Cc: struts-user@jakarta.apache.org
Subject: Best pratice for using Log4j, EJB, Struts, and WebLogic 6.1
together

Environment: WebLogic 6.1 SP1, Struts 1.0.1, and Log4j 1.1.3.  Application
is deployed as a single .ear file in a single WebLogic instance.  log4j.jar
is in the EJB classloader's classpath, not the WebLogic classpath nor the
web app's classloader classpath.

Scenario:  I want to be able to use Log4j in JSP custom tag handlers,
servlets (Struts action classes to be exact) and EJB's.

What I have done so far:  used a startup servlet to do Log4j configuration
for servlets logging.  The config file is under the web app's WEB/INF
directory.  Separately, I used a factory class with static methods to
configure Log4j for EJB logging, and for this I have to use a replicate of
the configuration file but outside the .ear file.  I use a RFAppender for
logging output.

What I want to achieve: configure Log4j once for the WebLogic instance, not
for EJB's and servlets separately, and I want to put the configuration file
in the .ear file, not outside it.

Other general questions: do you see any major problems with regard to
threading, singleton, and static classes in a EJB container environment?

Any suggestion is greatly welcome.

Eric Ma


--

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>