Legacy Knowledge Base
Published Sep. 10, 2025

Custom portlets are not logging correctly with SLF4J

Written By

Dia Seung

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

  • Custom plugins (portlets and hooks) are not properly logging with SLF4J implemented, with no log4j2 configurations changed from previous Liferay versions to 7.4 or Quarterly Release.

Environment

  • DXP 7.4
  • Quarterly Release lower than 2024.Q1.7

Resolution

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.

  • Check your slf4j-api version.  If higher than 1.7.x, you may need to downgrade to resolve the issue.(Additionally, you can compare to a clean Liferay bundle at your patch version to verify whether logging is expected to work out-of-the-box for custom plugins.)

  • If on a Quarterly Release lower than 2024.Q1.7, please try upgrading to 2024.Q1.7 or consider requesting a hotfix with LPD-21711 fix through a Support ticket. 

Additional Information

 

 

Did this article resolve your issue ?

Legacy Knowledge Base