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 "Schuweiler, Joel J." <Sc...@mayo.edu> on 2005/08/11 23:02:15 UTC

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@mayo.edu
Tel: 8-7900


Re: How to remove the logger instance?

Posted by Curt Arnold <ca...@apache.org>.
On 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.

> Otherwise, 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@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


How to remove the logger instance?

Posted by zhvfeng <zh...@hotmail.com>.
Hi,

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

Regards

Re: Log4j, websphere, rad, and log4j.xml location

Posted by Jan Pernica <ja...@pernica.org>.
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@mayo.edu
>Tel: 8-7900
>
>
>  
>
>------------------------------------------------------------------------
>
>Příchozí zpráva neobsahuje viry.
>Zkontrolováno Antivirovým systémem AVG.
>Verze: 7.0.338 / Virová báze: 267.10.6/69 - datum vydání: 11.8.2005
>
>  
>


RE: Log4j, websphere, rad, and log4j.xml location

Posted by Mark Womack <wo...@adobe.com>.
You sure that is how you are configuring?  PropertyConfigurator cannot
process xml files.

-Mark

> -----Original Message-----
> From: Schuweiler, Joel J. [mailto:Schuweiler.Joel@mayo.edu]
> Sent: Thursday, August 11, 2005 2:02 PM
> To: log4j-user@logging.apache.org
> Subject: 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@mayo.edu
> Tel: 8-7900



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org