> 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/id/konfigurasi/overleaf-toolkit/logging.md).

# Pencatatan

Anda dapat menggunakan `bin/logs` skrip untuk melihat log layanan.

Contoh penggunaan dasar:

```bash
# Lihat log layanan web
bin/logs web

# Tampilkan bantuan
bin/logs --help

# Lihat log untuk beberapa layanan sekaligus
bin/logs filestore docstore web clsi

# Ikuti keluaran log (seperti tail -f)
bin/logs -f filestore docstore web clsi

# Batasi jumlah baris yang dicetak (default 50)
bin/logs -n 50 web

# Tampilkan semua baris log
bin/logs -n all web

# Alihkan output ke file
bin/logs -n all web > web.log
```

Anda dapat menggunakan `bin/logs` skrip untuk melihat log layanan berikut: `clsi`, `contacts`, `docstore`, `document-updater`, `filestore`, `git-bridge`, `mongo`, `notifications`, `real-time`, `redis`, `spelling`, `tags`, `track-changes`, `web`, `web-api`, `history-v1`, `project-history`.

## Menyalin log

Lihat dokumen asli: <https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/logging#copying-logs>

Salin file log dari kontainer utama `sharelatex` ke komputer lokal Anda:

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

## Menyimpan log secara permanen

Kontainer Docker bersifat sementara, yang berarti file/direktori yang dibuat di dalam kontainer selama runtime (termasuk file log) akan dibuang jika kontainer dibuat ulang (misalnya, saat menjalankan `bin/up`). Untuk mempertahankan file log di antara pembuatan ulang kontainer:

* Setel variabel lingkungan `OVERLEAF_LOG_PATH` di dalam `config/overleaf.rc` file yang digunakan oleh Toolkit. Ini harus menjadi direktori di host yang akan di-bind-mount ke direktori log di dalam `sharelatex` kontainer.
* Setelah mengubah ini dan menjalankan `bin/up -d`, file log akan disimpan secara permanen di host dan dapat diakses langsung.

{% hint style="warning" %}
Anda harus menetapkan pemilik direktori log host yang digunakan untuk bind-mount ke `www-data` pengguna (uid=33) dan memastikan izin adalah `drwxr-xr-x` (755).

Contoh:

```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/id/konfigurasi/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.
