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 MNS logs to Log Service.


  • 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.
    • 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.


  1. Log on to the MNS console.
  2. In the left-side navigation pane, click Logging.
  3. In the top navigation bar, select a region.
  4. In the Select Target step of the Logging page, select Log Service.
  5. In the Configure Target step, specify the Project Name and Logstore Name parameters, and click Enable.


The project and the Logstore appear on the Logging page.