You can push Message Service (MNS) logs to Log Service and view operations logs in the Log Service console. You can query message traces based on the message ID to diagnose exceptions. This article describes how to push Simple Message Queue (formerly MNS) logs to Log Service.
Prerequisites
A Simple Log Service project and a Logstore are created. For more information, see Manage a project and Create a Logstore.
You can push Simple Message Queue (formerly MNS) operation logs only to a Simple Log Service project that is in the same region.
You have authorized Simple Message Queue (formerly MNS) to use the AliyunMNSLoggingRole role to export logs.
Click Cloud Resource Access Authorization and follow the on-screen instructions to complete the authorization.
WarningDo not revoke the authorization or delete the RAM role. Otherwise, Simple Message Queue (formerly MNS) logs cannot be pushed to Simple Log Service.
If you use a Resource Access Management (RAM) user to enable the log feature, you must first grant the required permissions to the RAM user. For more information, see RAM user authorization.
Procedure
Log on to the SMQ console.
In the left-side navigation pane, click Logging.
In the top navigation bar, select a region.
- In the Select Target step of the Logging page, select Log Service.
- In the Configure Target step, specify the Project Name and Logstore Name parameters, and click Enable.