I don't know but I use the settings below and it works for me. In my
build.xml I set the system property log4j.properties to a file
containing these properties, ex:
<sysproperty key="log4j.propertyfile"
value="${basedir}/log4j.properties"/>
log4j.rootLogger=DEBUG, console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.File=log.xml
log4j.appender.file.append=false
log4j.appender.file.layout=org.apache.log4j.xml.XMLLayout
log4j.logger.org.apache=DEBUG
log4j.logger.org.apache.xml.security.Init=WARN
Nicholas G Harlow wrote:
Hi,
I have been trying to get verbose trace output to help me diagnose some
problems I have been having. Does anyone have any suggestions? I put a
log4j.properties file in my classpath with the following content:
__________
# ------------------------------------------------------------------------
#
# Logging Configuration
#
# ------------------------------------------------------------------------
#
log4j.rootLogger=DEBUG, Console
########################################################################
#
# Logging based on packages
#
########################################################################
log4j.logger.org.apache.xml.security=DEBUG, Console
log4j.logger.org.apache.xml.security.test.AllTests=DEBUG, LOGTXT
########################################################################
#
# Logfile definitions
#
########################################################################
#Console Log
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=%-5p %C*{1}*:%L - %m\n
log4j.appender.Console.Target=System.err
#LOGTXT Log
log4j.appender.LOGTXT=org.apache.log4j.FileAppender
log4j.appender.LOGTXT.File=log.txt
log4j.appender.LOGTXT.Append=true
log4j.appender.LOGTXT.Threshold=DEBUG
log4j.appender.LOGTXT.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGTXT.layout.ConversionPattern=%-5p %C*{1}*:%L - %m\n
____________
I expect to see a bunch of output describing the ways xml security is
failing. All I see are the following, no DEBUG-level statements:
Dec 15, 2005 3:17:53 PM org.apache.xml.security.Init
INFO: Unable to patch xalan function table.
Dec 15, 2005 3:17:54 PM org.apache.xml.security.Init
INFO: MSG_EXCEPTION_LOGGED
Dec 15, 2005 3:17:55 PM org.apache.xml.security.utils.IdResolver
WARNING: Found an Element using an insecure Id/ID/id search method:
wss:UsernameToken
Dec 15, 2005 3:17:55 PM org.apache.xml.security.signature.Reference
INFO: Verification successful for URI "#utID"
Dec 15, 2005 3:17:55 PM org.apache.xml.security.utils.IdResolver
WARNING: Found an Element using an insecure Id/ID/id search method:
wss:UsernameToken
Dec 15, 2005 3:17:55 PM org.apache.xml.security.signature.Reference
INFO: Verification successful for URI "#utID"
Thanks in advance.
Nick