Legacy Knowledge Base
Published Sep. 10, 2025

What is the use of XML files in logs folder?

Written By

Pooja Bhambani

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

  • Users can find two sorts of files in the liferay-dxp/logs folder .log and .xml. What is the purpose of XML log files?

Environment

  • Liferay DXP 7.2
  • Liferay DXP 7.3
  • Liferay DXP 7.4

Resolution

  • XML log file provides a structured way to store log data, which can be useful in different scenarios:
    1. Custom Log Parsing: Since XML is structured, it's easier to write custom parsers or scripts that extract specific data fields (such as error codes, timestamps, or user IDs) for automated processing or reporting.
    2. Machine-Readable Format: Unlike traditional plain text logs, XML logs are easily parsed by machines or automated systems. This makes it simple to integrate with monitoring tools, log aggregators, and other systems that analyze logs for patterns, errors, or performance issues.
    3. Log Aggregation and Analysis: XML logs can be ingested by centralized logging systems (e.g., Logstash, Splunk) to facilitate advanced querying and visualization. The structured format allows for more sophisticated filtering and correlation of log events.
  • With this, the XML log format provides a detailed representation of which method and class errors are coming from, as shown below:
    <log4j:event logger="com.liferay.portal.kernel.util.LoggingTimer" timestamp="1722590570409" level="INFO" thread="main">

    <log4j:message><![CDATA[Completed com.liferay.portal.events.StartupHelperUtil#initResourceActions in 18 ms]]></log4j:message>

    <log4j:locationInfo class="com.liferay.portal.kernel.util.LoggingTimer" method="close" file="LoggingTimer.java" line="35"/>

    </log4j:event>

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base