I have a previous question and to get closer to a solution I want to enable Mosquitto broker logging on Windows 7.
Originally I have started the broker manually as follows:
mosquitto -p 1883 -v -v means verbose console logging. But this does not provide enough information, only the following line in case of my problem:
1486293976: Socket error on client <unknown>, disconnecting. I have tried doing what is described in this answer. Here is the config file's logging part:
# Note that if the broker is running as a Windows service it will default to # "log_dest none" and neither stdout nor stderr logging is available. # Use "log_dest none" if you wish to disable logging. log_dest stdout # If using syslog logging (not on Windows), messages will be logged to the # "daemon" facility by default. Use the log_facility option to choose which of # local0 to local7 to log to instead. The option value should be an integer # value, e.g. "log_facility 5" to use local5. #log_facility # Types of messages to log. Use multiple log_type lines for logging # multiple types of messages. # Possible types are: debug, error, warning, notice, information, # none, subscribe, unsubscribe, websockets, all. # Note that debug type messages are for decoding the incoming/outgoing # network packets. They are not logged in "topics". log_type error log_type warning log_type notice log_type information # Change the websockets logging level. This is a global option, it is not # possible to set per listener. This is an integer that is interpreted by # libwebsockets as a bit mask for its lws_log_levels enum. See the # libwebsockets documentation for more details. "log_type websockets" must also # be enabled. #websockets_log_level 0 # If set to true, client connection and disconnection messages will be included # in the log. connection_messages true # If set to true, add a timestamp value to each log message. log_timestamp true In this case I have started the broker as follows:
mosquitto -p 1883 -v option would override the config file with the default config so I have left that out. But I see no logging on the console.
Instead of stdout I have tried to log into a file, and changed the configuration as follows:
log_dest file d:\mosquitto.txt I have created the file manually and started the broker in the same way but no avail.
I do not get any log message if I do not use the -v option. How should it be done properly?
log_type debugorlog_type allgive you any more information?-voption gives some log entries on the console (cmd) but that uses default config.