# Logging

{% hint style="danger" %}
**WARNING: Setting the log level to TRACE may affect the gateway’s performance.**
{% endhint %}

Gateway writes logs to files within `logs` a directory, it might be useful to write to a volume used by the docker container:

`docker run -v $(pwd)/logs:/root/logs ...`<br>

### Log Instructions

The gateway offers two separate types of loggers - stdout and file loggers. The gateway provides several logger parameters that allow users to configure the amount of data logged. Users are encouraged to modify the file loggers in case they want to increase the gateway log level.

<table><thead><tr><th width="211">Gateway Parameters</th><th width="102">Type</th><th width="255">Description</th><th>Default</th></tr></thead><tbody><tr><td><code>log-level</code></td><td><code>STRING</code></td><td>Sets the logging level for <strong>STDOUT</strong></td><td>INFO</td></tr><tr><td><code>log-file-level</code></td><td><code>STRING</code></td><td>Sets the logging level for the <strong>file logger</strong></td><td>DEBUG</td></tr></tbody></table>

The Gateway’s common log levels and the parameters for the flags are listed below in order from most verbose (TRACE) to least verbose (ERROR).

```
TRACE, DEBUG, INFO, WARN, ERROR
```

The log files can be found in the `logs` directory of the Docker container (as specified with the docker command or the startup script). The most recent log file is named `gateway-[external port of gateway].log`.

Older log files are named `gateway-[external port of gateway]-[end timestamp].log`**.**


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bloxroute.com/solana/optimized-feed-relay/logging.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
