> 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/de/konfiguration/overleaf-toolkit/logging.md).

# Protokollierung

Du kannst das `bin/logs` Skript zum Anzeigen der Protokolle für die Dienste verwenden.

Grundlegende Anwendungsbeispiele:

```bash
# Protokolle des Web-Dienstes anzeigen
bin/logs web

# Hilfe anzeigen
bin/logs --help

# Protokolle für mehrere Dienste gleichzeitig anzeigen
bin/logs filestore docstore web clsi

# Protokollausgabe verfolgen (wie tail -f)
bin/logs -f filestore docstore web clsi

# Die Anzahl der ausgegebenen Zeilen begrenzen (Standard: 50)
bin/logs -n 50 web

# Alle Protokollzeilen anzeigen
bin/logs -n all web

# Ausgabe in eine Datei umleiten
bin/logs -n all web > web.log
```

Du kannst das `bin/logs` Skript zum Anzeigen der Protokolle für die folgenden Dienste: `clsi`, `contacts`, `docstore`, `document-updater`, `filestore`, `git-bridge`, `mongo`, `notifications`, `real-time`, `redis`, `spelling`, `tags`, `track-changes`, `web`, `web-api`, `history-v1`, `project-history`.

## Protokolle kopieren

Siehe die Originaldokumentation: <https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/logging#copying-logs>

Kopiere Protokolldateien aus dem Haupt- `sharelatex` Container auf Ihren lokalen Computer:

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

## Protokolle dauerhaft speichern

Docker-Container sind flüchtig, was bedeutet, dass Dateien/Verzeichnisse, die während der Laufzeit innerhalb des Containers erstellt werden (einschließlich Protokolldateien), verworfen werden, wenn der Container neu erstellt wird (zum Beispiel beim Ausführen von `bin/up`). Um Protokolldateien zwischen Container-Neuerstellungen zu behalten:

* Setze die Umgebungsvariable `OVERLEAF_LOG_PATH` in der `config/overleaf.rc` Datei, die vom Toolkit verwendet wird. Dies sollte das Verzeichnis auf dem Host sein, das per Bind-Mount an das Protokollverzeichnis innerhalb des `sharelatex` Containers eingehängt wird.
* Nachdem dies geändert wurde und `bin/up -d`ausgeführt wurde, werden Protokolldateien auf dem Host gespeichert und direkt zugänglich sein.

{% hint style="warning" %}
Du musst den Besitzer des Host-Protokollverzeichnisses, das für den Bind-Mount verwendet wird, auf den `www-data` Benutzer (uid=33) setzen und sicherstellen, dass die Berechtigungen `drwxr-xr-x` (755).

Beispiel:

```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/de/konfiguration/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.
