> For the complete documentation index, see [llms.txt](https://ayakaleaf-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://ayakaleaf-pro.ayaka.space/on-premises/el/diamorfosi/overleaf-toolkit/logging.md).

# Καταγραφή

Μπορείτε να χρησιμοποιήσετε το `bin/logs` script για την προβολή των logs των υπηρεσιών.

Βασικά παραδείγματα χρήσης:

```bash
# Προβολή των logs της web υπηρεσίας
bin/logs web

# Εμφάνιση βοήθειας
bin/logs --help

# Προβολή logs για πολλές υπηρεσίες ταυτόχρονα
bin/logs filestore docstore web clsi

# Παρακολούθηση της εξόδου των logs (όπως το tail -f)
bin/logs -f filestore docstore web clsi

# Περιορισμός του αριθμού των γραμμών που εκτυπώνονται (προεπιλογή 50)
bin/logs -n 50 web

# Εμφάνιση όλων των γραμμών των logs
bin/logs -n all web

# Ανακατεύθυνση της εξόδου σε αρχείο
bin/logs -n all web > web.log
```

Μπορείτε να χρησιμοποιήσετε το `bin/logs` script για την προβολή 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`.

## Αντιγραφή logs

Δείτε τα αρχικά docs: <https://docs.overleaf.com/on-premises/configuration/overleaf-toolkit/logging#copying-logs>

Αντιγράψτε τα αρχεία log από το κύριο `sharelatex` container στον τοπικό σας υπολογιστή:

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

## Διατήρηση logs

Τα Docker containers είναι εφήμερα, πράγμα που σημαίνει ότι τα αρχεία/οι κατάλογοι που δημιουργούνται μέσα στο container κατά τον χρόνο εκτέλεσης (συμπεριλαμβανομένων των αρχείων log) θα απορριφθούν αν το container αναδημιουργηθεί (για παράδειγμα, όταν εκτελείτε `bin/up`). Για να διατηρούνται τα αρχεία log μεταξύ αναδημιουργιών του container:

* Ορίστε τη μεταβλητή περιβάλλοντος `OVERLEAF_LOG_PATH` στο `config/overleaf.rc` αρχείο που χρησιμοποιείται από το Toolkit. Αυτός θα πρέπει να είναι ο κατάλογος στο host που θα γίνει bind-mount στον κατάλογο log μέσα στο `sharelatex` container.
* Αφού το αλλάξετε αυτό και εκτελέσετε `bin/up -d`, τα αρχεία log θα διατηρούνται στο host και θα είναι άμεσα προσβάσιμα.

{% hint style="warning" %}
Πρέπει να ορίσετε τον ιδιοκτήτη του καταλόγου logs στο host που χρησιμοποιείται για το bind-mount στον `www-data` χρήστη (uid=33) και να διασφαλίσετε ότι τα δικαιώματα είναι `drwxr-xr-x` (755).

Παράδειγμα:

```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://ayakaleaf-pro.ayaka.space/on-premises/el/diamorfosi/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.
