memo-circle-info日志记录

您可以使用 bin/logs 脚本来查看服务的日志。

基本使用示例:

# 查看 web 服务日志
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 容器复制日志文件到本地计算机:

持久化日志

Docker 容器是临时性的,这意味着在运行时容器内创建的文件/目录(包括日志文件)如果容器被重新创建(例如运行 bin/up)时将被丢弃。要在容器重新创建之间保留日志文件:

  • 设置环境变量 OVERLEAF_LOG_PATHconfig/overleaf.rc Toolkit 使用的文件中。这里应为主机上将要绑定挂载到容器内日志目录的目录。 sharelatex container.

  • 更改此项并运行后 bin/up -d,日志文件将保存在主机上并可直接访问。

circle-exclamation

最后更新于