Fix for internal logging not printing.

pull/1586/head
Roger A. Light 6 years ago
parent 8f1c8cba59
commit 50735afb5b

@ -62,8 +62,8 @@ extern "C" {
#define MOSQ_LOG_SUBSCRIBE (1<<5)
#define MOSQ_LOG_UNSUBSCRIBE (1<<6)
#define MOSQ_LOG_WEBSOCKETS (1<<7)
#define MOSQ_LOG_INTERNAL 0x80000000
#define MOSQ_LOG_ALL 0x7FFFFFFF
#define MOSQ_LOG_INTERNAL 0x80000000U
#define MOSQ_LOG_ALL 0xFFFFFFFFU
/* Error values */
enum mosq_err_t {

@ -207,7 +207,7 @@ static void config__init_reload(struct mosquitto_db *db, struct mosquitto__confi
config->log_facility = LOG_DAEMON;
config->log_dest = MQTT3_LOG_STDERR;
if(db->verbose){
config->log_type = INT_MAX;
config->log_type = UINT_MAX;
}else{
config->log_type = MOSQ_LOG_ERR | MOSQ_LOG_WARNING | MOSQ_LOG_NOTICE | MOSQ_LOG_INFO;
}
@ -543,7 +543,7 @@ int config__parse_args(struct mosquitto_db *db, struct mosquitto__config *config
}
}
if(db->verbose){
config->log_type = INT_MAX;
config->log_type = UINT_MAX;
}
return config__check(config);
}
@ -777,7 +777,7 @@ int config__read(struct mosquitto_db *db, struct mosquitto__config *config, bool
config->log_dest = cr.log_dest;
}
if(db->verbose){
config->log_type = INT_MAX;
config->log_type = UINT_MAX;
}else if(cr.log_type_set){
config->log_type = cr.log_type;
}

@ -385,7 +385,7 @@ void log__internal(const char *fmt, ...)
return;
}
log__printf(NULL, MOSQ_LOG_INTERNAL, "%s%s%s", "\e[32m", buf, "\e[0m");
log__printf(NULL, MOSQ_LOG_INTERNAL, "%s%s%s", "\e[32m", buf, "\e[0m");
}
int mosquitto_log_vprintf(int level, const char *fmt, va_list va)

@ -283,7 +283,7 @@ struct mosquitto__config {
int listener_count;
int log_dest;
int log_facility;
int log_type;
unsigned int log_type;
bool log_timestamp;
char *log_timestamp_format;
char *log_file;

Loading…
Cancel
Save