# 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.
