diff options
-rw-r--r-- | src/main.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -123,27 +123,36 @@ open_trace_stream() MU_STREAM_WRITE); if (rc) { mu_error(_("cannot create trace stream, " "using standard log: %s"), mu_strerror(rc)); mf_trace_stream = mf_strecho; - } + } } void trace(const char *fmt, ...) { if (do_trace) { + int bval = 0; va_list ap; if (!mf_trace_stream) open_trace_stream(); va_start(ap, fmt); mu_stream_vprintf(mf_trace_stream, fmt, ap); - mu_stream_flush(mf_trace_stream); + bval = 1; + mu_stream_ioctl(mf_trace_stream, MU_IOCTL_FILTER, + MU_IOCTL_FILTER_SET_DISABLED, + &bval); + mu_stream_write(mf_trace_stream, "\n", 1, NULL); + bval = 0; + mu_stream_ioctl(mf_trace_stream, MU_IOCTL_FILTER, + MU_IOCTL_FILTER_SET_DISABLED, + &bval); va_end(ap); } } void log_status(sfsistat status, SMFICTX *ctx) |