Skip to content

Commit

Permalink
Use line buffered mode for stdout.
Browse files Browse the repository at this point in the history
Closes #2354.
Closes #2749.
  • Loading branch information
ralight committed Apr 1, 2023
1 parent 1bf753e commit cc97f43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog.txt
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/logging.c
Expand Up @@ -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){
Expand Down

0 comments on commit cc97f43

Please sign in to comment.