> For the complete documentation index, see [llms.txt](https://docs.openiam.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openiam.com/troubleshooting/logs-and-diagnostics/debug-logs-cassandrajanusgraph.md).

# Enabling and disabling debug logs for Cassandra and JanusGraph

Turning DEBUG logging on and off for Cassandra and JanusGraph, and putting the configuration back afterwards.

Raising the log level gives the detail needed to diagnose a performance or configuration problem in the graph tier. The two services are configured separately — Cassandra through Logback, JanusGraph through Log4j — so turn on whichever one the symptom points at. [Backend exception error when running authentication manager](/troubleshooting/signing-in/auth-manager.md) is the usual reason to come here.

{% hint style="warning" %}
**Turn it off again.** DEBUG on either service is high volume, and leaving it on fills the disk — which, on the filesystem Cassandra and the search tier share, causes its own outage. See [Running out of disk space](/troubleshooting/performance/lackof_disk_space.md). Back up the configuration first, as below, so restoring it is one command.
{% endhint %}

## Cassandra

### Enable

{% stepper %}
{% step %}
**Back up the current configuration.**

{% code overflow="wrap" %}

```bash
cp /etc/cassandra/default.conf/logback.xml /etc/cassandra/default.conf/logback.xml_backup
```

{% endcode %}
{% endstep %}

{% step %}
**Edit the configuration**, using the reference copy below if you want a known-good starting point.

```bash
vi /etc/cassandra/default.conf/logback.xml
```

{% file src="/files/x0GEQfjmZA2IpEGYg9E7" %}
{% endstep %}

{% step %}
**Set the levels you need to `DEBUG`.** Raise only the loggers relevant to the problem rather than the root logger, where you can.
{% endstep %}

{% step %}
**Restart and confirm.**

```bash
systemctl restart cassandra
systemctl status cassandra
```

{% endstep %}
{% endstepper %}

### Disable

{% stepper %}
{% step %}
**Restore the backup.**

{% code overflow="wrap" %}

```bash
cp /etc/cassandra/default.conf/logback.xml_backup /etc/cassandra/default.conf/logback.xml
```

{% endcode %}
{% endstep %}

{% step %}
**Restart.**

```bash
systemctl restart cassandra
```

{% endstep %}
{% endstepper %}

## JanusGraph

### Enable

{% stepper %}
{% step %}
**Back up the current configuration.**

{% code overflow="wrap" %}

```bash
cp /usr/local/openiam/janusgraph/conf/log4j-console.properties /usr/local/openiam/janusgraph/conf/log4j-console.properties_backup
```

{% endcode %}
{% endstep %}

{% step %}
**Edit it.**

{% code overflow="wrap" %}

```bash
vi /usr/local/openiam/janusgraph/conf/log4j-console.properties
```

{% endcode %}
{% endstep %}

{% step %}
**Raise the level.**

```properties
log4j.appender.A2.Threshold=DEBUG
log4j.rootLogger=DEBUG, A2
```

{% endstep %}

{% step %}
**Restart and confirm.**

```bash
systemctl restart janusgraph
systemctl status janusgraph
```

{% endstep %}
{% endstepper %}

### Disable

{% stepper %}
{% step %}
**Put the level back.**

```properties
log4j.appender.A2.Threshold=INFO
log4j.rootLogger=INFO, A2
```

{% endstep %}

{% step %}
**Restart and confirm.**

```bash
systemctl restart janusgraph
systemctl status janusgraph
```

{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openiam.com/troubleshooting/logs-and-diagnostics/debug-logs-cassandrajanusgraph.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
