Updated on 2025-11-25 GMT+08:00

Log Reporting

Scenarios

If you enable log reporting for your DB instance, new logs generated for the instance will be uploaded to Log Tank Service (LTS) for management.

In certain regions, to use this function, you need to submit a service ticket to obtain required permissions.

Precautions

  • You will be billed for enabling this function under LTS.
  • Ensure that there are available LTS log groups and log streams in the same region as your instance.

    For more information about log groups and log streams, see Log Management.

Constraints

  • Error logs and slow query logs cannot share the same log stream.
  • If a structuring template (PostgreSQL slow log template or PostgreSQL error log template) has been bound to a log stream, ensure that the template type is the same as the log type when you select the log stream. For example, if a PostgreSQL error log template has been bound to a log stream, the log stream cannot be used for slow query logs.

    For details about how to bind a system template to a log stream, see Log Structuring.

Enabling Log Reporting in Batches

  1. Log in to the management console.
  2. Click in the upper left corner and select a region.
  3. Click in the upper left corner of the page and choose Databases > Relational Database Service.
  4. In the navigation pane, click Log Reporting. On the displayed page, select PostgreSQL from the drop-down list.
  5. Select at least one instance and click Ingest Logs to LTS.

    Figure 1 Log reporting

  6. Select an LTS log group and log stream and click OK.

    Figure 2 Configuring log ingestion to LTS

  7. To disable log ingestion to LTS, click Ingest Logs to LTS in the Operation column.

    Figure 3 Configuring log ingestion to LTS

  8. In the displayed pane, deselect the required log types and click OK.