bin/logs 腳本檢視各服務的日誌。
基本使用範例:
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 時)被捨棄。若要在容器重新建立之間保留日誌檔:
- 在 Toolkit 使用的
config/overleaf.rc檔案中設定環境變數OVERLEAF_LOG_PATH。這應該是主機上的一個目錄,會以 bind mount 方式掛載到sharelatex容器內的日誌目錄。 - 變更此設定並執行
bin/up -d後,日誌檔就會持久保存在主機上,並可直接存取。

