Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mosquitto log files not generating

In mosquitto broker, there are some configurations to write event log files. I am using following configurations and running the broker.

log_type all
log_dest file /root/Files/mosquitto.log
log_facility 5

Although, I don't see any logs being generated in the location /root/Files/mosquitto.log

What could be the problem? I'm using centos 6.7

Edit... Following are the config file contents

pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/

listener 1883
allow_anonymous false
auth_plugin /etc/mosquitto/plugin.so

listener 8883
cafile /etc/mosquitto/certs/ca.crt
certfile /etc/mosquitto/certs/server.crt
keyfile /etc/mosquitto/certs/server.key
include_dir /etc/mosquitto/conf.d

message_size_limit 268435455

log_type all 
log_dest file /root/Files/mosquitto.log
log_facility 5
like image 391
Dhanushka Dolapihilla Avatar asked Oct 22 '25 20:10

Dhanushka Dolapihilla


1 Answers

The problem is the '-v' on the command line.

Running mosquitto --help give the following

...

-v : verbose mode - enable all logging types. This overrides any logging options given in the config file.

...

The important bit being the second sentence which is disabling all the logging directives in the config file

Try without the '-v'

like image 181
hardillb Avatar answered Oct 25 '25 22:10

hardillb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!