# Explore application logs

## `yarn logs <scope>` or `npm run logs <scope>`

Gives simple access to logs from PHP, Nginx, SSL-Terminator, Varnish, Redis, MariaDB and ElasticSearch containers and Magento.

### **Available scopes**

* `mariadb`
* `nginx`
* `ssl-terminator`
* `redis`
* `elasticsearch`
* `magento`
* `php`
* `varnish`

{% hint style="info" %}
If you are using OpenSearch, the scope will remain `elasticsearch`.
{% endhint %}

### **Command options**

#### `--details`

Show extra details provided to logs

```bash
yarn logs nginx --details # for Yarn
npm run logs nginx -- --details # for NPM
```

#### `--timestamps, -t`

Show timestamps

```bash
yarn logs nginx --timestamps # for Yarn
npm run logs nginx -- --timestamps # for NPM
```

#### `--follow, -f`

Follow log output

```bash
yarn logs nginx --follow # for Yarn
npm run logs nginx -- --follow # for NPM
```

#### `--since`

Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)

```bash
yarn logs nginx --since=2s # for Yarn
npm run logs nginx -- --since=2s # for NPM
```

#### `--until`

Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)

```bash
yarn logs nginx --until=2s # for Yarn
npm run logs nginx -- --until=2s # for NPM
```

## **Usage example**:

```bash
yarn logs nginx

> ... # nginx logs

# ctrl + c

# this is not alias, but rather service name matching
yarn logs ng # or nginx

> ... # nginx logs

# for ssl-terminator
yarn logs ssl

> ... # ssl-terminator logs

# and for mariadb
yarn logs ma # or mariadb

> ... # mariadb logs

# and for magento
yarn logs mag # or magento

> ... # magento logs
```


---

# 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.create-magento-app.com/getting-started/available-commands/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.
