> For the complete documentation index, see [llms.txt](https://ayakaleaf-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://ayakaleaf-pro.ayaka.space/on-premises/on-premises-cs/konfigurace/overleaf-toolkit/logging.md).

# Protokolování

Můžete použít `bin/logs` skript pro zobrazení logů služeb.

Základní příklady použití:

```bash
# Zobrazit logy webové služby
bin/logs web

# Zobrazit nápovědu
bin/logs --help

# Zobrazit logy více služeb najednou
bin/logs filestore docstore web clsi

# Sledovat výstup logů (jako tail -f)
bin/logs -f filestore docstore web clsi

# Omezit počet vypsaných řádků (výchozí 50)
bin/logs -n 50 web

# Zobrazit všechny řádky logu
bin/logs -n all web

# Přesměrovat výstup do souboru
bin/logs -n all web > web.log
```

Můžete použít `bin/logs` skript pro zobrazení logů pro následující služby: `clsi`, `contacts`, `docstore`, `document-updater`, `filestore`, `git-bridge`, `mongo`, `notifications`, `real-time`, `redis`, `spelling`, `tags`, `track-changes`, `web`, `web-api`, `history-v1`, `project-history`.

## Kopírování logů

Původní dokumentaci najdete zde: <https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/logging#copying-logs>

Zkopírujte log soubory z hlavního `sharelatex` kontejneru do místního počítače:

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

## Trvalé ukládání logů

Kontejnery Docker jsou dočasné, což znamená, že soubory/adresáře vytvořené uvnitř kontejneru za běhu (včetně log souborů) budou při znovuvytvoření kontejneru odstraněny (například při spuštění `bin/up`). Chcete-li zachovat log soubory mezi znovuvytvořeními kontejneru:

* Nastavte proměnnou prostředí `OVERLEAF_LOG_PATH` v `config/overleaf.rc` souboru používaném Toolkitem. Mělo by jít o adresář na hostiteli, který bude připojen pomocí bind mountu do adresáře logů uvnitř `sharelatex` kontejneru.
* Po této změně a spuštění `bin/up -d`, budou log soubory uchovávány na hostiteli a budou přímo přístupné.

{% hint style="warning" %}
Musíte nastavit vlastníka hostitelského adresáře logů používaného pro bind mount na uživatele `www-data` www-data (uid=33) a zajistit, aby oprávnění byla `drwxr-xr-x` (755).

Příklad:

```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://ayakaleaf-pro.ayaka.space/on-premises/on-premises-cs/konfigurace/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.
