FAQlogging

kingthorin edited this page Mar 16, 2018 · 4 revisions

How do you configure ZAP logging

ZAP logs to a file called "zap.log" in the ZAP 'home' directory.

The logging is configured by the log4j.properties file in the same directory.

By default the 'main' logging levels are set to "INFO" by these 2 lines:

log4j.logger.org.parosproxy.paros=INFO
log4j.logger.org.zaproxy.zap=INFO

Changing these to "DEBUG" (and restarting ZAP) will significantly increase the amount of logging performed:

log4j.logger.org.parosproxy.paros=DEBUG
log4j.logger.org.zaproxy.zap=DEBUG

Logging can be selectively enabled using a Stand Alone script while ZAP is running (the examples below are Javascript scripts):

// The following will enable DEBUG logging for the API
org.apache.log4j.Logger.getLogger("org.zaproxy.zap.extension.api.API").setLevel(org.apache.log4j.Level.DEBUG);
// The following will enable DEBUG logging for the SessionFixation scanner
org.apache.log4j.Logger.getLogger("org.zaproxy.zap.extension.ascanrulesBeta.SessionFixation").setLevel(org.apache.log4j.Level.DEBUG);

Back to the FAQ

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.