> For the complete documentation index, see [llms.txt](https://docs.bloxroute.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bloxroute.com/solana/optimized-feed-relay/logging.md).

# 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
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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
