Jake,

Yes it does.  However we may be doing things a bit different/wrong.  Our
web app is AXIS.  We don't have a non-packaged class and we don't have a
main per see.  We use AXIS to expose the public methods of one class
packaged in a jar with a namespace of com.company.product.  This jar and
all its dependencies are located in jetty/webapps/axis/WEB_INF/lib.

I tried adding the log4j.properties file to this jar and to
WEB_INF/classes with no luck.

Now, if we uncomment the Configure Jetty Logging section in Jetty's
etc/Jetty.xml file, we get our logging output included with Jetty's log
output.  However, we don't yet know how to configure this output, i.e.
set log level, etc.

I suspect that since we are using commons-logging and because it can't
find our log4j.properties file, our logging is getting directed to Jetty
somehow.

-dh

-----Original Message-----
From: Jacob Kjome [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 28, 2006 10:56 PM
To: Log4J Users List
Subject: RE: How to get log4j to work with commons-logging in web
service app?


The default package is no package at all.  For instance, the root of 
your jar file or WEB-INF/classes in your webapp.  You know when you 
write a simple HelloWorld class with a main() method in it.  You 
generally don't provide a "package" entry at the top of the 
class.  You just write the class.  The package it ends up being in is 
the "default" package.  Make sense?

Jake

At 09:16 PM 3/27/2006, you wrote:
 >Jake,
 >
 >Umm, what do you mean by the default package?  Where/what is that?
You
 >are referring to log4j.properties right?
 >
 >Do you mean this goes into one of my app's jars?
 >
 >-dh
 >
 >-----Original Message-----
 >From: Jacob Kjome [mailto:[EMAIL PROTECTED]
 >Sent: Monday, March 27, 2006 10:13 PM
 >To: Log4J Users List
 >Subject: Re: How to get log4j to work with commons-logging in web
 >service app?
 >
 >
 >Put the config file in the default package.  Log4j will pick it up.
 >
 >Jake
 >
 >At 08:13 PM 3/27/2006, you wrote:
 > >I'm not sure if this is a log4j or commons-logging issue but my
 >problem
 > >is that...
 > >
 > >
 > >
 > >I have an application (local web service) that uses Jetty and AXIS.
 >We
 > >just started using commons-logging and we want to configure it to
use
 > >log4j.
 > >
 > >
 > >
 > >>From the online docs I gathered that to configure commons-logging I
 > >really just had to make sure that log4j was in my classpath; which I
 >did
 > >and through our IDE debugger and I see the following message which,
I
 > >think, means that commons-logging found log4j.  (Since this is
through
 > >the IDE it is the simple case, i.e. no Jetty and AXIS yet.
 > >
 > >
 > >
 > >log4j:WARN No appenders could be found for logger (Logger_Name).
 > >
 > >log4j:WARN Please initialize the log4j system properly.
 > >
 > >
 > >
 > >However, when I run the application (fire up Jetty/AXIS/App) I get
NO
 > >logging.  I don't know if this is a log4j or commons-logging issue
at
 > >runtime as I see nothing.
 > >
 > >
 > >
 > >Do I need any commons-logging property/config file?  If so, where
does
 > >it go?
 > >
 > >
 > >
 > >Where do I put the log4j.properties file?  I haven't used log4j
much,
 > >but I think it has been found in the current directory before; now
 >this
 > >is not working.  I have also put it in the classpath with no
success.
 > >
 > >
 > >
 > >Any ideas?  How can I debug to see where the failure is?
 > >
 > >
 > >
 > >Thanks.
 > >
 > >
 > >
 > >-Dave
 > >
 > >
 >
 >
 >---------------------------------------------------------------------
 >To unsubscribe, e-mail: [EMAIL PROTECTED]
 >For additional commands, e-mail: [EMAIL PROTECTED]
 >
 >
 >---------------------------------------------------------------------
 >To unsubscribe, e-mail: [EMAIL PROTECTED]
 >For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to