Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] mosquitto logging

Hi Romu,

Mosquitto logs to the daemon facility, so the best you can do right now is configure rsyslogd to send all daemon messages to a separate file.

In version 1.4 there is the option to configure the facility - daemon by default or one of local0-local7 through config. You could then send localX to a separate file just for mosquitto.

Cheers,

Roger

On Nov 4, 2014 1:04 AM, "Romu Hu" <huruomu@xxxxxxxxx> wrote:
Using "log_dest syslog", is it possible that mosquitto logs to its own log file instead of /var/log/messages?  My mosquitto broker runs in Ubuntu server 14.04.1 which has rsyslog.

Thanks
Romu

On 2014/10/31 21:54, Roger Light wrote:
Hi Romu,

If you're using the file log destination then yes, the broker does not
flush the logs after each write. It is entirely up to buffering on
your OS as to when it is actually written to disk.

As Karl says, you can always use syslog.

Cheers,

Roger


On Fri, Oct 31, 2014 at 10:55 AM, Romu Hu <huruomu@xxxxxxxxx> wrote:
Hi,

It seems that mosquitto logs are not immediately written into the log file,
if you run tail -f /var/log/mosquitto.log, you can see a line stops in the
middle, e.g.

1414752777: New connection from xxx.xxx.xxx.xxx on port xxxx.
1414752777: New client connecte

It seems that logs are flushed into the log file every couple of minutes or
when the broker restarts.  How to make the logs go immediately into the log
file?

And how to make the timestamp more human readable?


Thanks
Romu
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev

_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev

Back to the top