Use line buffered mode for stdout.

Closes #2354.
Closes #2749.
This commit is contained in:
Roger A. Light 2023-04-01 21:16:07 +01:00
parent 1bf753e773
commit cc97f433c1
2 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,7 @@ Broker:
- Fix std* files not being redirected when daemonising, when built with
assertions removed. Closes #2708.
- Fix default settings incorrectly allowing TLS v1.1. Closes #2722.
- Use line buffered mode for stdout. Closes #2354. Closes #2749.
Client library:
- Use CLOCK_BOOTTIME when available, to keep track of time. This solves the

View File

@ -130,6 +130,9 @@ int log__init(struct mosquitto__config *config)
log__printf(NULL, MOSQ_LOG_ERR, "Error: Unable to open log file %s for writing.", config->log_file);
}
}
if(log_destinations & MQTT3_LOG_STDOUT){
setlinebuf(stdout);
}
#ifdef WITH_DLT
dlt_fifo_check();
if(dlt_allowed){