Re: Problems with logging

2005-10-12 Thread Ron Reynolds
you need to place a log4j.properties file in your WEB-INF/classes directory so 
that log4j can load it and be happy (or
you need to remove the log4j jar from WEB-INF/lib which will leave you with jdk 
1.4 logging or jcl default logging (if
you're using jdk 1.3 or earlier).  i posted a suggested log4j.properties file a 
little while ago -
http://marc.theaimsgroup.com/?l=axis-userm=112855849027099w=2
hth.
..ron.
 Hi!

 I need to make an application that provides some web services. For
 this purpose I created a new application named MyTest and I copied
 the content of the axis-bin-1_2_1.tar.gz/axis-1_2_1/webapps/axis/ in
 that folder. After I get all the required libraries (such as
 activation.jar) so the validation test is satisfied. At this time, I
 put in WEB-INF/classes all the compiled classes of my application (in
 their folder) and I deployed the services using the administration
 service.
 In my classes I need to log something, so I wrote instructions like these:
   Log log = LogFactory.getLog(MyTest);
   log.debug(Test started);

 once I deploy the application to tomcat, on the console I see the following 
 rows

 log4j:WARN No appenders could be found for logger
 (org.apache.catalina.session.ManagerBase).
 log4j:WARN Please initialize the log4j system properly.

 and I can't see the log generated by my classes (I checked that they
 work correctly)

 somebody can help me?

 Thanks, Matteo





Re: Problems with logging

2005-10-12 Thread Matteo Miraz
Ok, I checked once again my configuration, and I found that
axis-ant.jar is not present in my new application's lib directory, and
inside that jar there is the log4.properties...

now I copied that file in WEB-INF/classes and the warning disappear...
but still no log from my code... any ideas?

thanks, teo

2005/10/12, Matteo Miraz [EMAIL PROTECTED]:
 Hi!

 I need to make an application that provides some web services. For
 this purpose I created a new application named MyTest and I copied
 the content of the axis-bin-1_2_1.tar.gz/axis-1_2_1/webapps/axis/ in
 that folder. After I get all the required libraries (such as
 activation.jar) so the validation test is satisfied. At this time, I
 put in WEB-INF/classes all the compiled classes of my application (in
 their folder) and I deployed the services using the administration
 service.
 In my classes I need to log something, so I wrote instructions like these:
   Log log = LogFactory.getLog(MyTest);
   log.debug(Test started);

 once I deploy the application to tomcat, on the console I see the following 
 rows

 log4j:WARN No appenders could be found for logger
 (org.apache.catalina.session.ManagerBase).
 log4j:WARN Please initialize the log4j system properly.

 and I can't see the log generated by my classes (I checked that they
 work correctly)

 somebody can help me?

 Thanks, Matteo



Re: Problems with logging

2005-10-12 Thread Ron Reynolds
you need to fix your log4j.properties file.  best reference i've found on how 
to write them is in the JavaDocs here -
http://logging.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurator.html#doConfigure(java.lang.String,
org.apache.log4j.spi.LoggerRepository)

 Ok, I checked once again my configuration, and I found that
 axis-ant.jar is not present in my new application's lib directory, and
 inside that jar there is the log4.properties...

 now I copied that file in WEB-INF/classes and the warning disappear...
 but still no log from my code... any ideas?

 thanks, teo

 2005/10/12, Matteo Miraz [EMAIL PROTECTED]:
 Hi!

 I need to make an application that provides some web services. For
 this purpose I created a new application named MyTest and I copied
 the content of the axis-bin-1_2_1.tar.gz/axis-1_2_1/webapps/axis/ in
 that folder. After I get all the required libraries (such as
 activation.jar) so the validation test is satisfied. At this time, I
 put in WEB-INF/classes all the compiled classes of my application (in
 their folder) and I deployed the services using the administration
 service.
 In my classes I need to log something, so I wrote instructions like these:
   Log log = LogFactory.getLog(MyTest);
   log.debug(Test started);

 once I deploy the application to tomcat, on the console I see the following 
 rows

 log4j:WARN No appenders could be found for logger
 (org.apache.catalina.session.ManagerBase).
 log4j:WARN Please initialize the log4j system properly.

 and I can't see the log generated by my classes (I checked that they
 work correctly)

 somebody can help me?

 Thanks, Matteo