Legacy Knowledge Base
公開されました Sep. 10, 2025

Liferay の xml ログ ファイルを無効にするにはどうすればよいですか?

Written By

Laura Li

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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

問題

  • {Liferay_Home}/log フォルダーには、次の 2 つの異なるファイルが表示されます。
    liferay.2019-08-25.log
    liferay.2019-08-25.xml
    25.log」ファイルを削除し、「xml」ファイルを無効にする必要があります。

環境

  • Liferay DXP 7.0
  • Liferay DXP 7.1
  • Liferay DXP 7.2
  • Liferay DXP 7.3
  • Liferay DXP 7.4

解決策

Liferay DXP 7.0 から 7.3:

  1. /ROOT/WEB-INF/lib/portal-impl.jar/META-INF から portal-log4j.xml を抽出します
  2. ファイルを /ROOT/WEB-INF/classes/META-INF/ にコピーします
  3. ファイルの下部にある行をコメント アウトするか削除します。
     <appender-ref ref="XML_FILE" />
  4. サーバーを再起動する

Liferay DXP 7.4:

  1. /ROOT/WEB-INF/shielded-container-lib/portal-impl.jar/META-INF から portal-log4j.xml を抽出します
  2. ファイルを /ROOT/WEB-INF/classes/META-INF/ にコピーします
  3. ファイルの名前を portal-log4j-ext.xml に変更します
  4. この場合、アペンダーを削除するだけでは十分ではありません。プロパティがない場合は、portal-loj4j.xml ファイルに存在するものが使用されるからです。 したがって、そのアペンダーを削除するだけでなく、作成されないように null 値でオーバーライドする必要があります。 ファイルの先頭にある de appenders セクションに次の行を追加します。
     <Null name="XML_FILE" />
  5. ファイルの下部にある行をコメント アウトするか削除します。
     <appender-ref ref="XML_FILE" />
  6. サーバーを再起動します。
Did this article resolve your issue ?

Legacy Knowledge Base