Stash 1.2 : Enabling Stash debug logging

This page describes how to enable debug level logging in Stash. Stash logs can be found in <STASH_HOME>/logs.

When using the standard Stash distribution, logs for the Tomcat webserver that hosts Stash can be found in <Stash installation directory>/log.

Enabling debug logging on startup

To enable debug logging whenever Stash is started, edit the <STASH_HOME>/stash-config.properties file (if this file doesn't exist then you should create it) and add the following line:

logging.logger.ROOT=DEBUG

Enabling debug logging at runtime

To enable debug logging for the root logger once Stash has been started, run the following command in your terminal:

curl -u <ADMIN_USERNAME> -v -X PUT -d "" -H "Content-Type: application/json" <BASE_URL>/rest/api/latest/logs/rootLogger/debug

# e.g.
curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://localhost:7990/rest/api/latest/logs/rootLogger/debug

To enable debug logging for a specific logger, run the following command in your terminal:

curl -u <ADMIN_USERNAME> -v -X PUT -d "" -H "Content-Type: application/json" <BASE_URL>/rest/api/latest/logs/logger/<LOGGER_NAME>/debug

# e.g.
curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://localhost:7990/rest/api/latest/logs/logger/com.atlassian.crowd/debug