Mosquitto is a popular open source MQTT broker.
It has two different log types:
- System status logs
- Informational and debugging logs
In this post I will only detail how to enable logging for debug purposes only.
You can configure logging in the Logging Section of the mosquitto.conf file.
#log_type error #log_type warning #log_type notice #log_type information # Use log_type all for verbose logging log_type all
To tell mosquitto to output logs to a file specify the following in the mosquitto.conf file:
log_dest file <full_file_path>