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.
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
- Log in to the management console.
- Click in the upper left corner and select a region.
- Click in the upper left corner of the page and choose Databases > Relational Database Service.
- In the navigation pane, click Log Reporting. On the displayed page, select PostgreSQL from the drop-down list.
Figure 1 Log reporting
- Select one or more instances and click Enable Log Reporting.
- Select an LTS log group and log stream and click OK.
- Error logs and slow query logs cannot share the same log stream.
- This request does not take effect immediately. There is a delay of about 10 minutes.
Figure 2 Enabling log reporting
- To disable log reporting, select one or more instances and click Disable Log Reporting.
- In the displayed dialog box, click OK.
Figure 3 Disabling log reporting
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot