axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smcar...@spansurf.com
Subject Re: Still have Log4j - Problems!
Date Fri, 22 Oct 2004 07:22:58 GMT
Hi,

the -Dlog4j.debug option should be defined before all of your other options i.e.

java -Dlog4j.debug -cp %AXISCLASSPATH% org.apache.axis.wsdl.WSDL2Java -s -d 
application -o c:\tools\test c:\tools\test.wsdl  

Secondly your log4j.properties file should be in your Axis service classpath 
i.e. <tomcat>/webapps/<yourcontext>/WEB-INF/classes

thirdly ensure you have log4j jar file in the lib directory of your context 
i.e. <tomcat>/webapps/<yourcontext>/lib

Lastly here is an example of the contents for your log4j.properties


# Set root category priority to INFO and its only appender to CONSOLE.
log4j.rootCategory=DEBUG, LOGFILE

# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=DEBUG
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n

# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=C:\axis.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.Threshold=DEBUG
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n


If you need to know what these do then refer to the log4j web site for a 
description of the options and instructions on setting up appenders etc.

Hope this helps

Regards

Steve


Quoting Florian Theurich <florian.theurich@x-cellcom.de>:

> Please ignore the previous one:
> 
> When entering 
> 
> java -cp %AXISCLASSPATH% org.apache.axis.wsdl.WSDL2Java -s -d application -o
> c:\tools\test c:\tools\test.wsdl -Dlog4j.debug 
> 
> nothing changes. Log4j ist just not properly configured, but I did not
> change anything since downloading Axis 1.1. As I am not overly interested in
> logging at this point in time, this is really getting on my nerves...!
> 
> And as I said I get the same message when trying it with axis 1.2 Beta, so
> something fundamental seems to be not working!!
> 
> Did no one else happen to experience the same?
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Enric Jaen [mailto:enric@nmg.upc.es] 
> Gesendet: Donnerstag, 21. Oktober 2004 19:07
> An: axis-user@ws.apache.org
> Betreff: Re: AW: AW: Log4j - Problems
> 
> 
> 
> plz post the log4j messages you get with the -Dlog4j.debug flag..
> 
> You can also try to copy the log4j.properties file in your working
> directory and add the flag -Dlog4.configuration=file:./log4j.properties 
> Try that together with the -Dlog4j.debug flag and post which 
> messages you get..  
> 
> Check also that your AXISCLASSPATH contains the lib log4j-1.2.8.jar
> 
> -Enric
> 
> 
> 
> On Thu, 21 Oct 2004, Florian Theurich wrote:
> 
> > I enter:
> > 
> > java -cp %AXISCLASSPATH% org.apache.axis.wsdl.WSDL2Java -s -d application
> -o
> > c:\tools\test c:\tools\test.wsdl
> > 
> > quite straightforward, I guess...
> > 
> > 
> > -----Ursprüngliche Nachricht-----
> > Von: Enric Jaen [mailto:enric@nmg.upc.es] 
> > Gesendet: Donnerstag, 21. Oktober 2004 18:04
> > An: axis-user@ws.apache.org
> > Betreff: Re: AW: Log4j - Problems
> > 
> > 
> > Can u plz post the command you try to run? Also, use -Dlog4j.debug to see
> > in the stdout detailed info about your log4j configuration. You should see
> > sthing like this (but not exactly the same):
> > log4j: Using URL [file:log4j.properties] for automatic log4j
> > configuration.
> > log4j: Reading configuration from URL file:log4j.properties
> > log4j: Parsing for [root] with value=[INFO, CONSOLE].
> > log4j: Level token is [INFO].
> > log4j: Category root set to INFO
> > log4j: Parsing appender named "CONSOLE".
> > log4j: Parsing layout options for "CONSOLE".
> > log4j: Setting property [conversionPattern] to [- %m%n].
> > log4j: End of parsing for "CONSOLE".
> > log4j: Setting property [threshold] to [INFO].
> > log4j: Parsed "CONSOLE" options.
> > log4j: Parsing for [org.apache.axis.TIME] with value=[stdout].
> > log4j: Level token is [stdout].
> > log4j: Category org.apache.axis.TIME set to DEBUG
> > log4j: Handling log4j.additivity.org.apache.axis.TIME=[null]
> > log4j: Finished configuring.
> > 
> > If there is an error, it should appear there..
> > 
> > 
> > 
> > 
> > 
> > On Thu, 21 Oct 2004, Florian Theurich wrote:
> > 
> > > Now I'm sort of confused:
> > > 
> > > I've downloaded axis1.1 and resin3.0
> > > 
> > > C:\resin3.0
> > > C:\axis1.1
> > > 
> > > I copied the axis webapp to the webapps folder of resin3.0 as well as
> all
> > > needed libs to the \lib folder 
> > > 
> > > My classpath however still points to c:\axis1.1\lib as it was suggested
> in
> > > the manual 
> > > My log4j.properties is in the web-inf\classes of axis1.1!
> > > 
> > > Is this where I am wrong? Do I need to put it in the web-inf\classes of
> > the
> > > resin? But the server is not even running, so where is the point??
> > > 
> > > 
> > > -----Ursprüngliche Nachricht-----
> > > Von: karim [mailto:k.yahioun@clipack.com] 
> > > Gesendet: Donnerstag, 21. Oktober 2004 17:34
> > > An: axis-user@ws.apache.org
> > > Betreff: Re: AW: Log4j - Problems
> > > 
> > > <>Try to put the log4j.properties file into WEB-INF/classes  repository

> > > and it'll works I think.
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> 
> 
> 
> 
> 
> 
> 





Mime
View raw message