mohan
mohan

Reputation: 87

Changing log level on AXIS and cxf webservices

I am accessing a webservice deployed in some other remote machine which is implemented using axis2. I have created a webesrvice using cxf which in turn invokes the other wesbervice which i mentioned above. When i deploy my war file on tomcat i am getting all the soap messages on console and it getting overridden with all the logs.I would like to disable the DEBUG statements.

Is there any way to change ? should i need to modify something in the remote server where the axis webservice is running( the one my cxf webservice is using). i am getting the debug statements as below.

pache.axis.message.MessageElement:trustLevelMap
2011-07-22 12:56:56 DeserializationContext [DEBUG] Exit: DeserializationContext:
:endElement()
2011-07-22 12:56:56 DeserializationContext [DEBUG] Enter: DeserializationContext
::endElement(, trustLevelMap)
2011-07-22 12:56:56 ProjectResourceBundle [DEBUG] org.apache.axis.i18n.resource:
:handleGetObject(popHandler00)
2011-07-22 12:56:56 DeserializationContext [DEBUG] Popping handler org.apache.ax
is.message.SOAPHandler@6961fdd9
2011-07-22 12:56:56 DeserializationContext [DEBUG] Popped element stack to org.a
pache.axis.message.MessageElement:navigation
2011-07-22 12:56:56 DeserializationContext [DEBUG] Exit: DeserializationContext:
:endElement()

Apart from this i want to change my cxf log level from debug to info also.Please provide me some pointers.

Upvotes: 3

Views: 4349

Answers (2)

slofo
slofo

Reputation: 21

Find the log4j.properties file. Add

log4j.logger.org.apache.axis=ERROR

For log4j.xml - don't know the syntax? See:

http://ws.apache.org/axis/java/developers-guide.html#Logging/Tracing and http://ws.apache.org/axis/java/developers-guide.html#TurningOnDebugOutput

(I'm answering this so much later than it was asked because I found this question when I wanted to know the same thing)

Upvotes: 2

Michael
Michael

Reputation: 1421

If CXF's Logger is log4j, you can include a log4j.xml or log4j.properties in the classpath of your web app (for instance in WEB-INF/classes) and in that file configure your logging however you like. If CXF defaults to some other Logger, I'm sure there's a way to coerce it to use log4j (I'm sure there's also a way to configure whatever Logger it's using, but I'm only familiar with log4j).

Upvotes: 0

Related Questions