Sometimes a message passed into a vlog function will have a trailing
new-line due to carelessness. Tolerate this situation by just
trimming them off in format_log_message().
ds_put_strftime(s, tmp, NULL);
break;
case 'm':
+ /* Format user-supplied log message and trim trailing new-lines. */
+ length = s->length;
va_copy(args, args_);
ds_put_format_valist(s, message, args);
va_end(args);
+ while (s->length > length && s->string[s->length - 1] == '\n') {
+ s->length--;
+ }
break;
case 'N':
ds_put_format(s, "%u", msg_num);