Skip to content

MessageAuditCapture

Kamil Baczkowicz edited this page Jan 24, 2016 · 2 revisions

Creating message log (mqtt-spy)

There are two ways to create a message log file:

  • record live messages (as they arrive)
  • export received messages

Recording live messages (mqtt-spy)

To enable the recording, go to your connection properties (see below), select the 'Log' tab, and set the logging mode to other than DISABLED. Then in the message log location put the desired location of your message log file (you can use either an absolute or a relative path).

http://baczkowicz.pl/mqtt-spy/images/mqtt-spy_v0.1.6_log-settings.png

To change the size and number of message logs (default is 10MB x 5 files), edit the log4j.properties file packaged inside the mqtt-spy jar file.

Recording live messages (mqtt-spy-daemon)

To record live messages in mqtt-spy-daemon, you need to enabled it in the XML configuration file. For the exact syntax see the Configuration wiki.

Exporting already received messages

To export already received messages, select the appropriate subscription tab and then click on the 'Tools' button. Select 'Export' and then choose whether you want the current message or all messages, and whether to copy it/them to the clipboard or a message log file (selected in the next step). If you select the "Message log" option, you will be prompted to select the file to save to.