> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/on-premises/nl/configuratie/overleaf-toolkit/logging.md).

# Logging

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

Voorbeelden van basisgebruik:

```bash
# Bekijk de logs van de webservice
bin/logs web

# Toon hulp
bin/logs --help

# Bekijk logs voor meerdere services tegelijk
bin/logs filestore docstore web clsi

# Volg de loguitvoer (zoals tail -f)
bin/logs -f filestore docstore web clsi

# Beperk het aantal afgedrukte regels (standaard 50)
bin/logs -n 50 web

# Toon alle logregels
bin/logs -n all web

# Leid de uitvoer om naar een bestand
bin/logs -n all web > web.log
```

Je kunt de `bin/logs` script om logs voor de volgende services te bekijken: `clsi`, `contacts`, `docstore`, `document-updater`, `filestore`, `git-bridge`, `mongo`, `meldingen`, `real-time`, `redis`, `spelling`, `tags`, `wijzigingen bijhouden`, `web`, `web-api`, `history-v1`, `projectgeschiedenis`.

## Logs kopiëren

Zie de originele documentatie: <https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/logging#copying-logs>

Kopieer logbestanden van de hoofd- `sharelatex` container naar je lokale computer:

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

## Logs persistent maken

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

* Stel de omgevingsvariabele `OVERLEAF_LOG_PATH` in in het `config/overleaf.rc` bestand dat door de Toolkit wordt gebruikt. Dit moet de map op de host zijn die als bind-mount wordt gekoppeld aan de logmap in de `sharelatex` container.
* Na dit te hebben gewijzigd en `bin/up -d`uit te voeren, worden logbestanden persistent op de host opgeslagen en direct toegankelijk.

{% hint style="warning" %}
Je moet de eigenaar van de logmap op de host die voor de bind-mount wordt gebruikt instellen op de `www-data` gebruiker (uid=33) en ervoor zorgen dat de rechten `drwxr-xr-x` (755).

Voorbeeld:

```bash
chown 33:33 data/overleaf/logs
chmod 755 data/overleaf/logs
```

{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/on-premises/nl/configuratie/overleaf-toolkit/logging.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
