Legacy Knowledge Base
Published Sep. 10, 2025

How to configure asynchronous logging in 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

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.

Issue

Environment

  • DXP 7.2
  • DXP 7.3
  • DXP 7.4
  • Quarterly Releases

Resolution

DXP 7.2 and DXP 7.3

NOTE: The following resolution requires customization and should only be implemented at the discretion of your team. Liferay Support will not be able to assist with designing or implementing customizations.

<appender name="ASYNC" class="org.apache.log4j.AsyncAppender" />
...
<root>
...
<appender-ref ref="ASYNC" />
...
</root>
  • For a more detailed example, see the attached DXP 7.2 portal-log4j-ext.xml.

DXP 7.4 and Quarterly Releases

NOTE: Liferay Support does not recommend or endorse specific third-party products over others. The information provided about products not created by Liferay is for reference purposes only, and any implementation of these principles will be at your team's discretion.

  • In 7.4 and above, we migrated to version 2.x of log4j.
  • In log4j 2.x, you can deploy a third-party disruptor.jar to gain access to an AsyncLogger that you can configure to make all loggers asynchronous with a system property.
  • See Log4J's 'Asynchronous Loggers for Low-Latency Logging' for detailed instructions.

Additional Information

 

 

Did this article resolve your issue ?

Legacy Knowledge Base