You can push Message Service (MNS) logs to Log Service and view operations logs in the Log Service console. You can query the message trace based on the message ID to diagnose exceptions. This topic describes how to configure MNS and Log Service to push logs.
- A project and a Logstore are created. For more information, see Step 1: Create a project and a Logstore.
You can push operations logs of queue messages and topic messages to a project that resides in the same region as the queues and topics.
- MNS is authorized to use the AliyunMNSLoggingRole role to push logs to Log Service.
You can go to the Cloud Resource Access Authorization page to complete the authorization.Notice
- This operation is required only when you enable the log management feature for the first time. You must complete the authorization by using your Alibaba Cloud account.
- If you use a RAM user to log on to MNS, you must grant required permissions to the RAM user. For more information, see RAM user authorization.
- To ensure that MNS operations logs can be pushed to Log Service, do not revoke permissions from the RAM role or delete the RAM role.
- Log on to the MNS console.
- Select a region in the top navigation bar.
- In the left-side navigation pane, click Logging Management.
- On the Logging Management page, find the region and click Action in the Action column.
- In the Configurations dialog box, click the Push Logs to LogService tab. Select the project that you created from the Project drop-down list and select the Logstore that you created from the LogStore drop-down list. Click OK.