geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: log4j question
Date Thu, 07 Aug 2008 16:09:01 GMT

On Aug 7, 2008, at 8:30 AM, ericp56 wrote:

>
> Hello,
>
> I am getting started with GBeans.  I am trying the log4 tutorial and  
> it's

Are you looking at

http://cwiki.apache.org/GMOxDOC21/configuring-application-specific-logging-with-log4j.html
?
>
> not quite working for me.  I'm adding it into my work from the EJB  
> tutorial.
>
> I'm guessing I'm not instantiating the logger correctly.
>
>
> {geronimo}/var/myapp/log4j.properties is configured to send output  
> to the
> console, which isn't happening.
>
> Here's my gbean entry in my openejb-jar.xml
>
> <dep:gbean name="DirectoryLog4jConfiguration"
> class 
> = 
> "org 
> .apache 
> .geronimo.system.logging.log4j.ApplicationLog4jConfigurationGBean">
>        <dep:attribute
> name="log4jFile">var/myapp/log4j.properties</dep:attribute>
>        <dep:reference
> name="ServerInfo"><name>ServerInfo</name></dep:reference>
> </dep:gbean>
>
> and in the code:
>
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> .
> .
> .
> private static Log logger = LogFactory.getLog(Echo.class);

This stuff looks ok.  Maybe the var/myapp/log4j.properties file is not  
set up correctly?  Does your app deploy and start OK?

thanks
david jencks

>
>
> Thanks,
>
> Eric
> -- 
> View this message in context: http://www.nabble.com/log4j-question-tp18873144s134p18873144.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Mime
View raw message