Commit 6bd92d3c 6bd92d3c07db00b2565730ba21f1586230510b06 by Sergey Poznyakoff

Follow-up to the previous commit.

* libmu_sieve/util.c: Update.
1 parent 886bca9c
......@@ -209,8 +209,10 @@ mu_sieve_error (mu_sieve_machine_t mach, const char *fmt, ...)
va_list ap;
va_start (ap, fmt);
mu_stream_printf (mach->errstream, "\033s<%d>\033O<%d>",
MU_LOG_ERROR, MU_LOGMODE_LOCUS);
mu_stream_printf (mach->errstream, "\033s<%d>\033O<%d>\033f<%u>%s\033l<%u>",
MU_LOG_ERROR, MU_LOGMODE_LOCUS,
strlen (mach->locus.mu_file), mach->locus.mu_file,
mach->locus.mu_line);
if (mach->identifier)
mu_stream_printf (mach->errstream, "%s: ", mach->identifier);
mu_stream_vprintf (mach->errstream, fmt, ap);
......@@ -231,8 +233,10 @@ mu_sieve_debug (mu_sieve_machine_t mach, const char *fmt, ...)
va_start (ap, fmt);
mu_stream_printf (mach->errstream,
"\033s<%d>\033O<%d>",
MU_LOG_DEBUG, MU_LOGMODE_LOCUS);
"\033s<%d>\033O<%d>\033f<%u>%s\033l<%u>",
MU_LOG_DEBUG, MU_LOGMODE_LOCUS,
strlen (mach->locus.mu_file), mach->locus.mu_file,
mach->locus.mu_line);
mu_stream_vprintf (mach->errstream, fmt, ap);
mu_stream_write (mach->errstream, "\n", 1, NULL);
va_end (ap);
......@@ -247,6 +251,11 @@ mu_sieve_log_action (mu_sieve_machine_t mach, const char *action,
if (!mach->logger)
return;
va_start (ap, fmt);
mu_stream_printf (mach->errstream,
"\033s<%d>\033O<%d>\033f<%u>%s\033l<%u>",
MU_LOG_INFO, MU_LOGMODE_LOCUS,
strlen (mach->locus.mu_file), mach->locus.mu_file,
mach->locus.mu_line);
mach->logger (mach->data, mach->errstream, mach->msgno, mach->msg,
action, fmt, ap);
va_end (ap);
......