> ## 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.

# السجلات

يمكنك استخدام السكربت `bin/logs` لعرض سجلات الخدمات.

أمثلة على الاستخدام الأساسي:

```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
```

يمكنك استخدام السكربت `bin/logs` لعرض سجلات الخدمات التالية: `clsi`، `contacts`، `docstore`، `document-updater`، `filestore`، `git-bridge`، `mongo`، `notifications`، `real-time`، `redis`، `spelling`، `tags`، `track-changes`، `web`، `web-api`، `history-v1`، `project-history`.

## نسخ السجلات

راجع الوثائق الأصلية: [https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/logging#copying-logs](https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/logging#copying-logs)

انسخ ملفات السجلات من الحاوية الرئيسية `sharelatex` إلى حاسوبك المحلي:

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

## الاحتفاظ الدائم بالسجلات

حاويات Docker مؤقتة، مما يعني أن الملفات والمجلدات التي تُنشأ داخل الحاوية أثناء التشغيل (بما في ذلك ملفات السجلات) ستُحذف إذا أُعيد إنشاء الحاوية (على سبيل المثال، عند تشغيل `bin/up`). للاحتفاظ بملفات السجلات بين عمليات إعادة إنشاء الحاوية:

* اضبط متغير البيئة `OVERLEAF_LOG_PATH` في الملف `config/overleaf.rc` الذي يستخدمه Toolkit. يجب أن يكون هذا هو المجلد على المضيف الذي سيُربط (bind-mount) بمجلد السجلات داخل الحاوية `sharelatex`.
* بعد تغيير ذلك وتشغيل `bin/up -d`، ستُحفظ ملفات السجلات بشكل دائم على المضيف ويمكن الوصول إليها مباشرةً.

<Warning>
  يجب تعيين مالك مجلد السجلات على المضيف المستخدم في الربط إلى المستخدم `www-data` (uid=33) والتأكد من أن الصلاحيات هي `drwxr-xr-x` (755).

  مثال:

  ```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.