ZAP Debug Mode

1,228 views
Skip to first unread message

Dejan Lukan

unread,
Mar 23, 2014, 8:07:05 AM3/23/14
to zaproxy...@googlegroups.com
Hello,

I'm not starting ZAP from eclipse, but from console by using the following command:

cd build/zap/
./zap.sh 

But I would like to start it in DEBUG mode. Therefore, I changed build/zap/xml/log4j.properties:

log4j.rootLogger=debug,console,R
log4j.appender.R=org.apache.log4j.RollingFileAppender
#to move to dynamically user log file.  See Constant.java
# ZAP: rebrand
log4j.appender.R.File=${zap.user.log}/zap.log
log4j.appender.R.MaxFileSize=4096KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=3
log4j.appender.R.layout=org.apache.log4j.PatternLayout
#log4j.appender.R.layout.ConversionPattern=%d [%-5t] %-5p %c{1} - %m%n
log4j.appender.R.layout.ConversionPattern=%d %-5p %c{1} - %m%n
log4j.logger.org.parosproxy.paros=DEBUG
log4j.logger.org.zaproxy.zap=DEBUG
log4j.logger.org.apache.commons.httpclient=ERROR
log4j.logger.org.parosproxy.paros.core.proxy.ProxyThread=ERROR
log4j.logger.net.htmlparser.jericho=ERROR
log4j.appender.Stdout.threshold=debug

Then I restarted zap, but without success: only the INFO messages are being shown in my console. Any ideas what else do I need to do in order to be able to start zap in debug mode without using eclipse?

Thank you


thc...@gmail.com

unread,
Mar 23, 2014, 12:39:11 PM3/23/14
to zaproxy...@googlegroups.com
Hi.

ZAP picks the log4j.properties file that's in the ZAP's default directory or the directory manually specified [1].

Are you changing that file? (instead of the one bundled in "installation" directory, although you might want to change that too but note that if ZAP created the default directory before you made the changes, the file in the default directory will not be automatically updated).

[1] https://code.google.com/p/zaproxy/wiki/FAQconfig

Best regards.
--
You received this message because you are subscribed to the Google Groups "OWASP ZAP Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dejan Lukan

unread,
Mar 24, 2014, 6:52:52 AM3/24/14
to zaproxy...@googlegroups.com
Hi,

For anyone else looking for the answer to this problem, you have to change the /home/user/.ZAP_D/log4j.properties file and change the following lines:

log4j.rootLogger=debug,console, R
log4j.logger.org.parosproxy.paros=DEBUG
log4j.logger.org.zaproxy.zap=DEBUG

After that you can just start zap normally and it should work fine.

./zap.sh

If something doesn't work, you should also try changing the /home/user/.ZAP/log4j.properties file.

That's it.
Reply all
Reply to author
Forward
0 new messages