Thanks, Sean.

I dont have  a clue, why it doesn't work. 
I put commons-logging.jar, commons-loggin-api.jar, log4j-1.2.15.jar into lib 
directory.

I edited log4j.properties like below.
Then I stared my app using
java -Dlog4j.configuration=log4j.properties -jar PartnersXC.jar

Still, nothing happens :-(
Any ideas?

My coleage told me, that this "should work right out of box", so I really don't 
know what am I missing...

BR,ivan

# ------------------------------------------------------------------------
#
# 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, Console

########################################################################
#
# 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.out

#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


and then I started my app.like

-----Original Message-----
From: sean.mul...@sun.com [mailto:sean.mul...@sun.com] 
Sent: Monday, January 11, 2010 5:10 PM
To: security-dev@xml.apache.org
Subject: Re: debugging

Look at src/org/apache/xml/security/resource/log4j.properties in the 
source tree. Change these lines to print debug messages on Console:

log4j.logger.org.apache.xml.security=DEBUG, Console
log4j.logger.org.apache.xml.security.test.AllTests=DEBUG, Console

Specify the following system property when running tests:

-Dlog4j.configuration=[path to logging.properties]

Make sure log4j and apache commons logging jars are in classpath.

Look at the build.xml and search for "log4j" to see how this works when 
running ant and Junit tests.

--Sean


Bolcina Ivan wrote:
> Thanks for info, but I don't understand it.
> 
> The link on site of apache xml security seems broken, and link you provided 
> explains things very generic.
> 
> As far as I understand, I have to write yet another configuration file?
> Has anyone enable debuging messages? Can you share your configuration 
> files/startup properties?
> 
> BR,ivan
> 
> -----Original Message-----
> From: sean.mul...@sun.com [mailto:sean.mul...@sun.com] 
> Sent: Wednesday, January 06, 2010 3:27 PM
> To: security-dev@xml.apache.org
> Subject: Re: debugging
> 
> Bolcina Ivan wrote:
>> Hi.
>>
>>  
>>
>> How to enable debuging messages. I looked at log4j.log and it seems 
>> fine, but no debug messages are printed out to console?
> 
> See: http://commons.apache.org/logging/guide.html#Configuration
> 
> --Sean

Reply via email to