> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Logging

Je kunt het script `bin/logs` gebruiken om de logs van de services te bekijken.

Voorbeelden van basisgebruik:

```bash theme={null}
# View the web service logs
bin/logs web

# Show help
bin/logs --help

# View logs for multiple services at once
bin/logs filestore docstore web clsi

# Follow log output (like tail -f)
bin/logs -f filestore docstore web clsi

# Limit the number of lines printed (default 50)
bin/logs -n 50 web

# Show all log lines
bin/logs -n all web

# Redirect output to a file
bin/logs -n all web > web.log
```

Je kunt het script `bin/logs` gebruiken om de logs van de volgende services te bekijken: `clsi`, `contacts`, `docstore`, `document-updater`, `filestore`, `git-bridge`, `mongo`, `notifications`, `real-time`, `redis`, `spelling`, `tags`, `track-changes`, `web`, `web-api`, `history-v1`, `project-history`.

## Logs kopiëren

Zie de oorspronkelijke documentatie: [https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/logging#copying-logs](https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/logging#copying-logs)

Kopieer logbestanden van de hoofdcontainer `sharelatex` naar je lokale computer:

```bash theme={null}
docker cp sharelatex:/var/log/overleaf/{service-name}.log {service-name}.log
```

## Logs bewaren

Docker-containers zijn vluchtig, wat betekent dat bestanden/mappen die tijdens runtime in de container worden aangemaakt (inclusief logbestanden) verloren gaan als de container opnieuw wordt aangemaakt (bijvoorbeeld bij het uitvoeren van `bin/up`). Om logbestanden te behouden wanneer containers opnieuw worden aangemaakt:

* Stel de omgevingsvariabele `OVERLEAF_LOG_PATH` in het bestand `config/overleaf.rc` in dat door de Toolkit wordt gebruikt. Dit moet de map op de host zijn die via een bind-mount wordt gekoppeld aan de logmap in de container `sharelatex`.
* Nadat je dit hebt gewijzigd en `bin/up -d` hebt uitgevoerd, worden logbestanden op de host bewaard en zijn ze daar direct toegankelijk.

<Warning>
  Je moet de eigenaar van de logmap op de host die voor de bind-mount wordt gebruikt instellen op de gebruiker `www-data` (uid=33) en ervoor zorgen dat de rechten `drwxr-xr-x` (755) zijn.

  Voorbeeld:

  ```bash theme={null}
  chown 33:33 data/overleaf/logs
  chmod 755 data/overleaf/logs
  ```
</Warning>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.