Windows 10 Log File Does Not update by Service

I ran command line with -c reference to mosquitto.conf file. I also updated the configuration file to log to file. All that does work if you launch Mosquitto from command line.

I run Mosquitto from the installed Windows Service “Mosquitto Broker” and it uses the same configuration file to use parameters and password file to connect to Node-RED.

There are no entries when the Mosquitto Broker service is running. How can I get the system to log entries to a file? why would syntax work in command line execution rather than the same through the service?



Logging on the windows service does behave differently because it disables all destinations by default. If you’re specified log_dest file ... it should be fine though. Are you using an absolute path for the log file?



log_dest file C:\temp\mosquitto.log

copied straight out of the file “C:\Program Files\Mosquitto\mosquitto.conf”

I will repeat…
mosquitto.log will not update if you run the service. It does work, when/if you run it through command line and use the same mosquitto.conf file… So it is not a syntax issue. System has permission on the folder to write. I tried it as an administrator and user. Both users behave the same. I know it IS using the file due to other parameters being true which are enabled in the mosquitto.conf file relationship. i.e. password file etc.

Can you please test and see how this behaves in Windows 10 systems? Or can you tell me what other means does work in Windows using the service?


I’ve tested this on my Windows 10 system and confirm that the log is truncated when it shouldn’t be. I’ve implemented a fix which will be part of the 2.0.13 release soon.



I’m very glad to have helped find this issue.

Kind Regards,