# Stash Latest : Enabling Stash debug logging

This page last changed on Sep 13, 2012 by tim@atlassian.com.

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 two lines:

    logging.logger.ROOT=DEBUG
    logging.logger.com.atlassian.stash=DEBUG

### Enabling debug logging at runtime

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

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

    # e.g.
    curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://localhost:7990/rest/api/latest/logs/rootLogger/debug
    curl -u admin -v -X PUT -d "" -H "Content-Type: application/json" http://localhost:7990/rest/api/latest/logs/logger/com.atlassian.stash/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