Sorry that I posted the message three times. I was having a fight with my
mail program!
Eddie
>From: "Eddie" <[EMAIL PROTECTED]>
>Reply-To: Orion-Interest <[EMAIL PROTECTED]>
>To: Orion-Interest <[EMAIL PROTECTED]>
>Subject: log4j and ejb usage ??
>Date: Wed, 9 May 2001 16:13:50 +0200
>
>Hellu
Thanks for replies. I don't think it's actually necessary to load it
from a bean and would probably be better to use a servlet.
Todd
Fredrik Lindgren wrote:
> Is it necessary for you to load the configuration from an EJB?
>
> We use the DOMConfigurator by having a simple servlet load the
> c
We call log4j from JSP and from EJB.
We use a servlet to startup log4j: a servlet parameter passes the
configuration file name.
Here is the code:
public class InitLog4J extends HttpServlet {
private static final String PARAM_NAME_CONFIG_FILE =
"configuration.file";
public void init(Serv
ginal Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Stan Ng
> Sent: Saturday, April 28, 2001 10:27 AM
> To: Orion-Interest
> Subject: Re: log4j and ejb
>
>
> I pass in the Java property that points to the whatever
> configuration
Is it necessary for you to load the configuration from an EJB?
We use the DOMConfigurator by having a simple servlet load the
configuration file as a resource. We set the servlet to load early at
startup and we load the configuration in the servlet's init method to
have the logging configured as
I pass in the Java property that points to the whatever configuration I want
at the time. Usually I use the log4j.properties file with the console
appender & rolling file appender, slightly modified for my purposes.
Basically, the format of that file is covered under documentation at the
log4j we