> 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/on-premises-cs/konfigurace/overleaf-toolkit/logging.md).

# Logová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 vytištěný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ů následujících služeb: `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ů

Viz původní dokumentace: <https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/logging#copying-logs>

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

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

## Uchovávání logů

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

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

{% hint style="warning" %}
Musíte nastavit vlastníka adresáře logů na hostiteli použitého pro bind-mount na uživatele `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://overleaf-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.
