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

Liferayで非同期ロギングを設定する方法

written-by

Madeleine Clay

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

問題

環境

  • DXP 7.2
  • DXP 7.3
  • DXP 7.4
  • 四半期ごとのリリース

解像度

DXP 7.2およびDXP 7.3

:以下の解決策はカスタマイズが必要であり、チームの裁量によってのみ実施されるべきである。 Liferayサポートはカスタマイズの設計や実装を支援することはできません。

<appender name="ASYNC" class="org.apache.log4j.AsyncAppender" />
...
<root>
...
<appender-ref ref="ASYNC" />
...
</root>
  • より詳細な例については、添付のDXP 7.2portal-log4j-ext.xmlを参照してください。

DXP 7.4と四半期ごとのリリース

:Liferayサポートは特定のサードパーティ製品を推奨するものではありません。 Liferayが作成したものではない製品について提供された情報は、あくまで参考のためのものであり、これらの原則を実行するかどうかは、あなたのチームの裁量に委ねられます。

  • 7.4以上では、log4jのバージョン2.xに移行しました。
  • log4j 2.xでは、サードパーティのdisruptor.jarをデプロイして、システムプロパティですべてのロガーを非同期にするように設定できるAsyncLoggerにアクセスすることができます。
  • 詳しい説明は、Log4Jの'Asynchronous Loggers for Low-Latency Logging'を参照。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base