Legacy Knowledge Base
Published Sep. 10, 2025

Liferay logs Timezone

Written By

Apsara Raheja

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

  • How do change the timezone displayed in the Liferay log files without changing the JVM time zone?

Environment

  • Liferay DXP 7.4 [All updates]
  • Liferay Quarterly Release

Resolution

  • Get a copy of the portal-log4j.xml file by extracting it from the portal-impl.jarfrom [Liferay_HOME]\[Tomcat_HOME]\webapps\ROOT\WEB-INF\shielded-container-lib\portal-impl.jar\META-INF\
  • Rename the copy of the portal-log4j.xml file to portal-log4j-ext.xml
  • Find the below property in portal-log4j-ext.xml
    <Layout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p [%t][%c{1}:%L] %m%n" type="PatternLayout"/> 
  • Add Timezone as like below:
    <Layout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS}(TimeZone} %-5p [%t][%c{1}:%L] %m%n" type="PatternLayout"/> 
  • Find the required values for TIME ZONE at http://en.wikipedia.org/wiki/List_of_zoneinfo_timezones.
  • Place the modified portal-log4j-ext.xml file at [Liferay_HOME]/[Tomcat_HOME]/webapps/ROOT/WEB-INF/classes/META-INF
  • Restart the portal.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base