> 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/ko/configuration/overleaf-toolkit/logging.md).

# 로깅

다음을 사용할 수 있습니다 `bin/logs` 서비스의 로그를 보는 스크립트입니다.

기본 사용 예시:

```bash
# 웹 서비스 로그 보기
bin/logs web

# 도움말 보기
bin/logs --help

# 여러 서비스를 한 번에 로그 보기
bin/logs filestore docstore web clsi

# 로그 출력을 계속 따라가기(tail -f처럼)
bin/logs -f filestore docstore web clsi

# 출력되는 줄 수 제한(기본값 50)
bin/logs -n 50 web

# 모든 로그 줄 표시
bin/logs -n all web

# 출력을 파일로 리다이렉트
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>

메인에서 로그 파일을 복사 `sharelatex` 컨테이너에서 로컬 컴퓨터로:

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

## 로그 보존

Docker 컨테이너는 휘발성이므로, 실행 중 컨테이너 내부에 생성된 파일/디렉터리(로그 파일 포함)는 컨테이너가 재생성되면(예: 다음을 실행할 때) 삭제됩니다 `bin/up`). 컨테이너 재생성 간에 로그 파일을 유지하려면:

* 환경 변수 설정 `OVERLEAF_LOG_PATH` 다음에서 `config/overleaf.rc` Toolkit에서 사용하는 파일. 이는 호스트에서 컨테이너 내부의 로그 디렉터리에 바인드 마운트될 디렉터리여야 합니다. `sharelatex` 컨테이너.
* 이를 변경한 후 다음을 실행하면 `bin/up -d`, 로그 파일이 호스트에 유지되며 직접 접근할 수 있습니다.

{% hint style="warning" %}
바인드 마운트에 사용되는 호스트 로그 디렉터리의 소유자를 다음으로 설정해야 합니다 `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/ko/configuration/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.
