> 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/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://overleaf-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.
