The problem with going this route (and it's what I do ;)) is that you only
have ONE log4j config for the whole server. Each app has the same logging
and you can't really separate them easily (without writing a long config
file that breaks up based on category).

-mike

> -----Original 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 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 website( http://jakarta.apache.org/log4j )
>
> Returning to the topic at hand, my run_orion.bat has the following line:
>
> java -Dlog4j.configuration=file:///orion/cfg/log4j.properties orion.jar
>
>
> The property value I provide is just a URL to a local file.  I
> find it handy
> to able to specify what configuration file I want while developing.  In
> theory, the PropertyConfigurator checks a number of places, including the
> classpath, for the log4j.properties file.  It doesn't seem to work for me,
> but someone else on this list can probably help you out if you want to go
> that route.
>
> As far as I can tell, using log4j violates the letter of EJB spec, but not
> the spirit.  Works just fine for me, so I'm going to go with the pragmatic
> route and fix things later if need be.
>
> hth...
>
>
>
> ----- Original Message -----
> From: "Todd M Benge" <[EMAIL PROTECTED]>
> To: "Orion-Interest" <[EMAIL PROTECTED]>
> Sent: Friday, April 27, 2001 2:39 PM
> Subject: log4j and ejb
>
>
> > Hi,
> >
> > I'm trying to use log4j to log from an enterprise bean.  I've been able
> > to get a bean to log to stdout using the BasicConfigurator but am not
> > able to get it to log using either the DOMConfigurator or the
> > PropertyConfigurator.  I believe Property and DOM configurators need a
> > file to set up the appenders.  Has anybody been successful in using a
> > configurator othere than the BasicConfigurator with a bean?  If so, how?
> >
> > Thanks,
> >
> > Todd
> >
>
>
>


Reply via email to