edit-icon download-icon

Message Log Tool

Last Updated: Apr 18, 2017

Enables you to query message operation logs by queue/topic name, MessageID, and start and end time.

Download and installation

Version 1.0.0

  • Updated on: 2016-03-15 Download
  • Functions updated
    • Operation logs of a specified message can be queried by queue/topic, MessageID, and start and end time.

Installation

  • Download and decompress the toolkit.
  • Go to the mns_logging directory, and run any of the following command to install the tool.
    1. Linux: sudo python setup.py install
    2. Windows: python.exe setup.py install
  • For more help information, refer to the mns_logging/README document.

Help

Configuration

Configure domain names of MNS and OSS, the access account, and the AccessKey/Secret pair. “Hangzhou” is used as an example in this document.

  1. mnslogging_cmd config --ossendpoint=http://oss-cn-hangzhou.aliyuncs.com --endpoint=http://$accountid.mns.cn-hangzhou.aliyuncs.com --accesskeyid=$your_accesskey --accesskeysecret=$your_accesskeysecret
  • $accountid indicates the account ID which can be viewed on Alibaba official website.
  • $your_accesskey/$your_accesskeysecret indicates the account’s key pair which can be viewed on Alibaba official website.

Query queue logs

Operation logs of a specified message can be queried by the queue name, MessageID, and start and end time.

  1. mnslogging_cmd queryqueuelog --queuename=$queuename --msgid=$msgid --starttime=$starttime --endtime=$endtime
  • $queuename indicates the name of the specified queue.
  • $msgid indicates the ID of the message to be queried.
  • $starttime/$endtime indicates the time scope of the logs to be queried.

For example:

Query topic logs

Operation logs of a specified message can be queried by the topic name, MessageID, and start and end time.

  1. mnslogging_cmd querytopiclog --topicname=$topicname --msgid=$msgid --starttime=$starttime --endtime=$endtime
  • $topicname indicates the name of the specified topic.
  • $msgid indicates the ID of the message to be queried.
  • $starttime/$endtime indicates the time scope of the logs to be queried.

For example:

Thank you! We've received your feedback.