aspose file tools*
The moose likes Web Services and the fly likes Logging with WSS4j Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Logging with WSS4j" Watch "Logging with WSS4j" New topic
Author

Logging with WSS4j

Andrew Prinoli
Greenhorn

Joined: Jan 11, 2007
Posts: 22
Hello ,
I'm using Tomcat6 + Axis 1+wss4j.
I have to modify something in wss4j's source code but I can't test its results...but I couldn't enable logging with log4j..
How should I do that???
I could be able to do log with log4j for axis..using the following properties file , placed in folder \Tomcat\webapps\axis\WEB-INF\classes.

log4j.properties :

# Set root logger level to WARN and its only appender to A1.
log4j.rootLogger=WARN, A1
# show DEBUG for SOAPPart method
log4j.logger.org.apache.axis.SOAPPart=DEBUG
# A1 is set to be a ConsoleAppender.
# log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1=org.apache.log4j.FileAppender
log4j.appender.A1.File=axis.log
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n


How do I enable logging with wss4j?
I tried putting the properties file included with wss4j's source but with no luck..
Thanks in Advance
Ladislav Lencucha
Greenhorn

Joined: Oct 28, 2012
Posts: 2
First of all, you have to change the logging from apache.commons.Logging to Log4j:
https://cwiki.apache.org/CXF20DOC/debugging-and-logging.html#DebuggingandLogging-UsingLog4jInsteadofjava.util.logging

Then your setup will work correctly.
 
Don't get me started about those stupid light bulbs.
 
subject: Logging with WSS4j