Under certain conditions, it's possible for messages emitted via LOG()
to get lost before exit, apparently because they are emitted by another
thread. common_params_print_usage() uses printf directly, and is not
affected.
Flushing the log before exit seems to resolve this.
if (ctx_arg.print_usage) {
ctx_arg.print_usage(argc, argv);
}
+ common_log_flush(common_log_main());
exit(0);
}
if (ctx_arg.params.completion) {