> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Logging

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

Contoh penggunaan dasar:

```bash theme={null}
# View the web service logs
bin/logs web

# Show help
bin/logs --help

# View logs for multiple services at once
bin/logs filestore docstore web clsi

# Follow log output (like tail -f)
bin/logs -f filestore docstore web clsi

# Limit the number of lines printed (default 50)
bin/logs -n 50 web

# Show all log lines
bin/logs -n all web

# Redirect output to a file
bin/logs -n all web > web.log
```

Anda dapat menggunakan skrip `bin/logs` untuk melihat log dari layanan-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 dokumentasi asli: [https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/logging#copying-logs](https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/logging#copying-logs)

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

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

## Menyimpan log secara permanen

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

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

<Warning>
  Anda harus menetapkan pemilik direktori log host yang digunakan untuk bind-mount ke pengguna `www-data` (uid=33) dan memastikan izinnya adalah `drwxr-xr-x` (755).

  Contoh:

  ```bash theme={null}
  chown 33:33 data/overleaf/logs
  chmod 755 data/overleaf/logs
  ```
</Warning>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.