legacy-knowledge-base
公開されました Sep. 10, 2025

ブラウザーの操作を必要とせずに、ローカル マシン上のファイルで LXC ログを取得する方法

written-by

Isaac Wilson

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • 私たちのチームは、LXC ロギングをローカル マシン上のファイルに転送したいと考えていますが、可能であればこれを自動化し、通常の UI ロギング および CLI lcp log オプション (パイピングを含む)リンクされた記事に記載されている例)、ブラウザーとの対話が必要なようです。

Environment

  • Liferay エクスペリエンス クラウド (LXC)

解決策

  • これは、 lcp log および tee コマンドの組み合わせの前に、認証パラメーターを lcp login コマンド (直接またはスクリプト変数を介して) に提供することによって実現できます。
  • 単純化した例 ( をより堅牢なコマンドおよび/または繰り返しスクリプトに変換できます) として、次の端末コマンドを使用して 環境の Web サーバー サービスから 4 月 23 日に生成されたすべてのログをテキストにプルできます。 file (時間枠が限られているため、コマンドを手動で終了せずにファイルが作成されます):
    echo email@email.com 'password' | lcp login --no-browser; lcp log -u liferay-projectname-env.lfr.cloud --since "04/23/2021 00:00:00" --until "04/23/2021 23:59:59" | tee Apr23-webserver.txt

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base