# logtail: Print recent lines from a configured log file

Source: https://zotonic.com/docs/3022/logtail-print-recent-lines-from-a-configured-log-file

URI: https://zotonic.com/id/3022

Language: en

Print recent lines from a configured log file.

Syntax
------

```text
bin/zotonic logtail [error|crash]
```

Requirements and effects
------------------------

Reads the configured local log directory and invokes tail.

With no selector it reads console.log. `error` selects error.log and `crash` selects crash.log. It prints the last 500 lines and exits; it does not follow the file continuously. Confirm the timestamp and site before interpreting an old entry as the current failure.

Example
-------

```sh
bin/zotonic logtail error
```

Run commands from the Zotonic workspace root. Replace `garden` with your site name where applicable.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/3022?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/3022?language=en>)
