Hive MQ Logging : Assistance Required

Hi, Can someone share insight as to how to configure logging on our Hive MQ.
Also can one also share insight as to where the log file will be stored?

Some info which might help :
Hive MQ is running in a docker container on a Linux Server
License type : industrial-edge-edition

Events which I require to be logged :

Hi @ASEWPER ,

Great to see your interest in MQTT and HiveMQ, welcome to the community!

Installation

$HIVEMQ_HOME
   └── extensions
           ├── hivemq-mqtt-message-log-extension
           ├── LICENSE.txt
           ├── README.html
           ├── README.txt
           ├── hivemq-extension.xml
           ├── hivemq-mqtt-message-log-extension-1.1.0.jar
           └── mqttMessageLog-example.properties
  • Rename the mqttMessageLog-example.properties file to mqttMessageLog.properties
  • Modify the mqttMessageLog.properties file for your needs. For example, to log everything:

#Log EVERYTHING

verbose=true
publish-received=true
publish-send=true
client-connect=true
connack-send=true
client-disconnect=true
subscribe-received=true
suback-send=true
unsubscribe-received=true
unsuback-send=true
ping-request-received=true
ping-response-send=true
puback-received=true
puback-send=true
pubrec-received=true
pubrec-send=true
pubrel-received=true
pubrel-send=true
pubcomp-received=true
pubcomp-send=true

MQTT messages will be logged to the $HIVEMQ_HOME/log/hivemq.log file (a.k.a the broker log).

I hope it helps.
Kind regards,
Dasha from HiveMQ Team

Thank you @Daria_H ,

Appreciate the asssitance. :slight_smile:
I have tried this and can confirm that it works. Can you advise as to how I can exclude the PING REQUEST and PING RESPONSE messages from the logs?

Thanks in advance!

See screenshot below:

:slight_smile: after updating the mqttMessageLog.properties file you can either restart the broker or disable and enable the extension.
Disable the extension:

touch $HIVEMQ_HOME/extensions/hivemq-mqtt-message-log-extension/DISABLED
sleep 10

Enable the extension:

rm $HIVEMQ_HOME/extensions/hivemq-mqtt-message-log-extension/DISABLED

I hope it helps
Kind regards,
Dasha from HiveMQ Team