# View Logs

### **Running from Source Code**

If you are running the Client using the source code, you can view the logs directly without additional configuration.\
Alternatively, you can configure the `.env` file to [save logs to file](#configuring-.env-to-ave-logs-to-file).

### **Running with Docker**

If you are running the Client using Docker, there are several ways to view the logs:

1. **Interactive Mode**\
   If you start Docker in interactive mode, the logs will be displayed directly in the terminal.
2. **Other Modes**\
   Assuming your Docker container is named `btcvali`, you can view the logs in two ways:
   * Use the command `docker logs -f btcvali` to see the latest logs.
   * Configure the `.env` file to [save logs to file](#configuring-.env-to-save-logs-to-file).

### Configuring `.env` to save logs to file

To save logs to a file, modify the following parameters in your `.env` file:

* **`LOGGER_MAX_SIZE=30m`**\
  Specifies the maximum size of the log file.
* **`LOGGER_DIR=/app/.exsat/logs`**\
  Defines the directory where log files will be stored.

  > **Note:** If you are running the Client with Docker, ensure this directory is mapped to your server. If you follow the example commands provided in the documentation, you can find the logs in the directory: `~/.exsat/logs/`.
* **`LOGGER_MAX_FILES=30d`**\
  Sets the maximum number of days to retain log files.

With these configurations, logs will be properly stored and managed according to your specified settings.


---

# 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.exsat.network/guides-of-data-consensus/others/operation-references/common-operations/view-logs.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.
