> 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/pl/konfiguracja/overleaf-toolkit/logging.md).

# Logowanie

Możesz użyć `bin/logs` skryptu do przeglądania logów usług.

Podstawowe przykłady użycia:

```bash
# Wyświetl logi usługi web
bin/logs web

# Pokaż pomoc
bin/logs --help

# Wyświetl logi wielu usług jednocześnie
bin/logs filestore docstore web clsi

# Śledź wyjście logów (jak tail -f)
bin/logs -f filestore docstore web clsi

# Ogranicz liczbę wypisywanych linii (domyślnie 50)
bin/logs -n 50 web

# Pokaż wszystkie linie logów
bin/logs -n all web

# Przekieruj wyjście do pliku
bin/logs -n all web > web.log
```

Możesz użyć `bin/logs` skrypt do przeglądania logów następujących usług: `clsi`, `contacts`, `docstore`, `document-updater`, `filestore`, `git-bridge`, `mongo`, `notifications`, `real-time`, `redis`, `spelling`, `tags`, `track-changes`, `web`, `web-api`, `history-v1`, `project-history`.

## Kopiowanie logów

Zobacz oryginalną dokumentację: <https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/logging#copying-logs>

Skopiuj pliki logów z głównego `sharelatex` kontenera na swój lokalny komputer:

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

## Trwałe przechowywanie logów

Kontenery Docker są tymczasowe, co oznacza, że pliki/katalogi utworzone wewnątrz kontenera w czasie działania (w tym pliki logów) zostaną usunięte, jeśli kontener zostanie odtworzony (na przykład podczas uruchamiania `bin/up`). Aby zachować pliki logów między odtworzeniami kontenera:

* Ustaw zmienną środowiskową `OVERLEAF_LOG_PATH` w `config/overleaf.rc` pliku używanym przez Toolkit. Powinien to być katalog na hoście, który zostanie podmontowany (bind mount) do katalogu logów wewnątrz `sharelatex` kontenera.
* Po zmianie tego i uruchomieniu `bin/up -d`, pliki logów będą przechowywane na hoście i dostępne bezpośrednio.

{% hint style="warning" %}
Musisz ustawić właściciela katalogu logów na hoście używanego do podmontowania bind-mount na użytkownika `www-data`  (uid=33) i upewnić się, że uprawnienia to `drwxr-xr-x` (755).

Przykład:

```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/pl/konfiguracja/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.
