You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Geeta Ramani <gr...@terralink.com> on 2004/04/23 21:13:05 UTC

[OT - OT - Friday!!] Eclipse, Struts app and log4j

Hello all:

I have always worked with Sun Studio One and making log4j work was a piece of cake. Throw the jar in the classpath, put the log4j.properties in WEB-INF/classes, restart tomcat and bob's your uncle.

However the company i work for now uses eclipse and I assumed (wrongly as it turns out) that I could integrate log4j easily into this IDE too. *Wrong!!*. I have googled till I'm going cross-eyed. One person suggested I create a log4j plug-in. Another suggested I create a Log4jInit servlet. But I can't help thinking "Come **on**, can it be that involved??!!" 

So folks, if you've successfully solved this problem, make my day, will ya? In words of two syllables or less, please - my brain's fried already..(:(

Many thanks in advance!
Geeta

P.S Btw, I did manage to create a Java **application** (with a main method and all) to talk to log4j within eclipse and no, it did not invlove writing servlets and plugins and what not. My problems arise when I try to get my *Struts app* to recognize log4j. (hey, maybe this makes it on-topic after all!! ;))

P.P.S. Oh yeah, I guess it may help to show you the error I get.  Here it is:

log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.

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


Re: [OT - OT - Friday!!] Eclipse, Struts app and log4j

Posted by Mike Zatko <mz...@boscovs.com>.
1. Right click project -> Properties
2. Select Java Build Path
3. Click Libraries Tab
4. Add Log4j jar

Geeta Ramani wrote:

>Hello all:
>
>I have always worked with Sun Studio One and making log4j work was a piece of cake. Throw the jar in the classpath, put the log4j.properties in WEB-INF/classes, restart tomcat and bob's your uncle.
>
>However the company i work for now uses eclipse and I assumed (wrongly as it turns out) that I could integrate log4j easily into this IDE too. *Wrong!!*. I have googled till I'm going cross-eyed. One person suggested I create a log4j plug-in. Another suggested I create a Log4jInit servlet. But I can't help thinking "Come **on**, can it be that involved??!!" 
>
>So folks, if you've successfully solved this problem, make my day, will ya? In words of two syllables or less, please - my brain's fried already..(:(
>
>Many thanks in advance!
>Geeta
>
>P.S Btw, I did manage to create a Java **application** (with a main method and all) to talk to log4j within eclipse and no, it did not invlove writing servlets and plugins and what not. My problems arise when I try to get my *Struts app* to recognize log4j. (hey, maybe this makes it on-topic after all!! ;))
>
>P.P.S. Oh yeah, I guess it may help to show you the error I get.  Here it is:
>
>log4j:WARN No appenders could be found for logger
>(org.apache.commons.digester.Digester).
>log4j:WARN Please initialize the log4j system properly.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>  
>


-- 

Michael H. Zatko
WebSphere Developer
Boscov's Information Services
Work: 610-929-7317
Home: 610-562-2407


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


Re: [OT - OT - Friday!!] Eclipse, Struts app and log4j

Posted by Hubert Rabago <ja...@yahoo.com>.
Any chance you're using Log4j under a commons-logging interface?
I'm forced to use WSAD, which is Eclipse underneath, at work, but I'm not
sure if the solution that worked for me with work for you.  I'm thinking
since WSAD & Eclipse are both IBM (c'mon, it's Friday, no flaming), they both
prefer the IBM-sponsored JDK logging, which takes over your commons-logging.
I found a solution (longer than two syllalbes) here:
http://www-106.ibm.com/developerworks/forums/dw_thread.jsp?forum=266&thread=28061&message=176187&cat=9

Hubert

--- Geeta Ramani <gr...@terralink.com> wrote:
> Hello all:
> 
> I have always worked with Sun Studio One and making log4j work was a piece
> of cake. Throw the jar in the classpath, put the log4j.properties in
> WEB-INF/classes, restart tomcat and bob's your uncle.
> 
> However the company i work for now uses eclipse and I assumed (wrongly as
> it turns out) that I could integrate log4j easily into this IDE too.
> *Wrong!!*. I have googled till I'm going cross-eyed. One person suggested I
> create a log4j plug-in. Another suggested I create a Log4jInit servlet. But
> I can't help thinking "Come **on**, can it be that involved??!!" 
> 
> So folks, if you've successfully solved this problem, make my day, will ya?
> In words of two syllables or less, please - my brain's fried already..(:(
> 
> Many thanks in advance!
> Geeta
> 
> P.S Btw, I did manage to create a Java **application** (with a main method
> and all) to talk to log4j within eclipse and no, it did not invlove writing
> servlets and plugins and what not. My problems arise when I try to get my
> *Struts app* to recognize log4j. (hey, maybe this makes it on-topic after
> all!! ;))
> 
> P.P.S. Oh yeah, I guess it may help to show you the error I get.  Here it
> is:
> 
> log4j:WARN No appenders could be found for logger
> (org.apache.commons.digester.Digester).
> log4j:WARN Please initialize the log4j system properly.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�
http://photos.yahoo.com/ph/print_splash

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