www.emsdn.com
Class Profile: Home »» Java [Java] under "Java" »»» Log4j, websphere, rad, and log4j.xml location

Log4j, websphere, rad, and log4j.xml location


I am trying to configure log4j using
PropertyConfigurator.configure("log4j.xml");
I am however having an issue. I never receive a logging event. When I look at the websphere log, log4j says it is unable to find log4j.xml. I'm using RAD (IBM's Rappid Application Developer) to write the program that uses the log4j and I'm wondering exactly what I need to feed it for a path to this file. I can not use an absolute path because I will never know what that absolute path is since it will be running in websphere.
Another issue I'm having is when I import an external jar and then upload my war to websphere it can't find any of the log4j stuff.
I can include exact errors if this will help.
thanks
Joel Schuweiler
Middleware
Schuweiler.Joel (AT) mayo (DOT) edu
Tel: 8-7900


No. 1# | By Developer Tags User at [2008-5-12] | size: 1360 bytes

We use the same but you have to specify the JNDI name to load it
correctly or do not provide file name but provide it as a resource stream

Jan

Schuweiler, Joel J. wrote:

>I am trying to configure log4j using
>
>PropertyConfigurator.configure("log4j.xml");
>
>I am however having an issue. I never receive a logging event. When I look at the websphere log, log4j says it is unable to find log4j.xml. I'm using RAD (IBM's Rappid Application Developer) to write the program that uses the log4j and I'm wondering exactly what I need to feed it for a path to this file. I can not use an absolute path because I will never know what that absolute path is since it will be running in websphere.
>
>Another issue I'm having is when I import an external jar and then upload my war to websphere it can't find any of the log4j stuff.
>
>I can include exact errors if this will help.
>
>thanks
>
>
>
>Joel Schuweiler
>Middleware
>Schuweiler.Joel (AT) mayo (DOT) edu
>Tel: 8-7900
>
>


>
>
>
>P** va neobsahuje viry.
>Zno Am mem AVG.
>Verze: 7.0.338 / V ze: 267.10.6/69 - datum *: 11.8.2005
>


No. 1# | By Developer Tags User at [2008-5-12] | size: 206 bytes

Hi,
My app need to dynamically create many loggers, is there any way to remove the logger instance at runtime? , I'm afraid, the memory will be increased continuously.
Regards

No. 1# | By Developer Tags User at [2008-5-12] | size: 1161 bytes

Aug 16, 2005, at 8:33 PM, zhvfeng wrote:

Hi,

My app need to dynamically create many loggers,

Why?

Calls to getLogger() will return a previously created instance if the
arguments are identical, so the concern is the number of distinct
logger names requested. Logger names are primarily an organizational
technique to allow you to control destinations, thresholds and such.
Having a large number of logger names reduces the organizational
benefit of each distinct name. It is as if you decided that each
file needed to be in its own directory, then the benefit of each new
directory as an organizational technique becomes less and less.

is there any way to remove the logger instance at runtime?

Not readily if at all.

, I'm afraid, the memory will be increased continuously.

In an intentionally degenerate case, it could be an issue, but in a
normal logging hierarchy, it shouldn't be an issue.

To unsubscribe, e-mail: log4j-user-unsubscribe (AT) logging (DOT) apache.org
For additional commands, e-mail: log4j-user-help (AT) logging (DOT) apache.org



Java Hot!

Java New!


Copyright © 2008 www.emsdn.com • All rights reserved • CMS Theme by www.emsdn.com - 0.484