Legacy Knowledge Base
Published Sep. 10, 2025

Where can I get the database query logs for my Liferay PaaS project?

Written By

Alfonso Crisci

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.
Note: please note that Liferay has renamed its Liferay Experience Could offerings to Liferay SaaS (formerly LXC) and Liferay PaaS (formerly LXC-SM).

Issue

  • Where can I get database query logs for my Liferay PaaS project?

Environment

  • Liferay PaaS
  • Dynatrace Add-On

Resolution

  1. Ensure to activate the Advanced Application Metrics through Dynatrace: please find the related recource at Advanced Application Metrics (Production Only)
  2. Once active, within the Dynatrace Dashboard, go to the left sidebar > Monitor > Databases
  3. To know the MySQL slow query logs maintained by MySQL instances on the disk, you shall enable the necessary flags using environment variables, for example:

    LCP_GCP_DATABASE_FLAG_SLOW_QUERY_LOG=on
    LCP_GCP_DATABASE_FLAG_LOG_OUTPUT=TABLE
    The full documentation reference is at https://learn.liferay.com/dxp-cloud/latest/en/platform-services/database-service/database-service.html#environment-variables. Once set, you'll be able to see the slow query logs in your mysql database.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base