Follow-up to the previous commit.
* libmu_sieve/util.c: Update.
Showing
1 changed file
with
13 additions
and
4 deletions
... | @@ -209,8 +209,10 @@ mu_sieve_error (mu_sieve_machine_t mach, const char *fmt, ...) | ... | @@ -209,8 +209,10 @@ mu_sieve_error (mu_sieve_machine_t mach, const char *fmt, ...) |
209 | va_list ap; | 209 | va_list ap; |
210 | 210 | ||
211 | va_start (ap, fmt); | 211 | va_start (ap, fmt); |
212 | mu_stream_printf (mach->errstream, "\033s<%d>\033O<%d>", | 212 | mu_stream_printf (mach->errstream, "\033s<%d>\033O<%d>\033f<%u>%s\033l<%u>", |
213 | MU_LOG_ERROR, MU_LOGMODE_LOCUS); | 213 | MU_LOG_ERROR, MU_LOGMODE_LOCUS, |
214 | strlen (mach->locus.mu_file), mach->locus.mu_file, | ||
215 | mach->locus.mu_line); | ||
214 | if (mach->identifier) | 216 | if (mach->identifier) |
215 | mu_stream_printf (mach->errstream, "%s: ", mach->identifier); | 217 | mu_stream_printf (mach->errstream, "%s: ", mach->identifier); |
216 | mu_stream_vprintf (mach->errstream, fmt, ap); | 218 | mu_stream_vprintf (mach->errstream, fmt, ap); |
... | @@ -231,8 +233,10 @@ mu_sieve_debug (mu_sieve_machine_t mach, const char *fmt, ...) | ... | @@ -231,8 +233,10 @@ mu_sieve_debug (mu_sieve_machine_t mach, const char *fmt, ...) |
231 | 233 | ||
232 | va_start (ap, fmt); | 234 | va_start (ap, fmt); |
233 | mu_stream_printf (mach->errstream, | 235 | mu_stream_printf (mach->errstream, |
234 | "\033s<%d>\033O<%d>", | 236 | "\033s<%d>\033O<%d>\033f<%u>%s\033l<%u>", |
235 | MU_LOG_DEBUG, MU_LOGMODE_LOCUS); | 237 | MU_LOG_DEBUG, MU_LOGMODE_LOCUS, |
238 | strlen (mach->locus.mu_file), mach->locus.mu_file, | ||
239 | mach->locus.mu_line); | ||
236 | mu_stream_vprintf (mach->errstream, fmt, ap); | 240 | mu_stream_vprintf (mach->errstream, fmt, ap); |
237 | mu_stream_write (mach->errstream, "\n", 1, NULL); | 241 | mu_stream_write (mach->errstream, "\n", 1, NULL); |
238 | va_end (ap); | 242 | va_end (ap); |
... | @@ -247,6 +251,11 @@ mu_sieve_log_action (mu_sieve_machine_t mach, const char *action, | ... | @@ -247,6 +251,11 @@ mu_sieve_log_action (mu_sieve_machine_t mach, const char *action, |
247 | if (!mach->logger) | 251 | if (!mach->logger) |
248 | return; | 252 | return; |
249 | va_start (ap, fmt); | 253 | va_start (ap, fmt); |
254 | mu_stream_printf (mach->errstream, | ||
255 | "\033s<%d>\033O<%d>\033f<%u>%s\033l<%u>", | ||
256 | MU_LOG_INFO, MU_LOGMODE_LOCUS, | ||
257 | strlen (mach->locus.mu_file), mach->locus.mu_file, | ||
258 | mach->locus.mu_line); | ||
250 | mach->logger (mach->data, mach->errstream, mach->msgno, mach->msg, | 259 | mach->logger (mach->data, mach->errstream, mach->msgno, mach->msg, |
251 | action, fmt, ap); | 260 | action, fmt, ap); |
252 | va_end (ap); | 261 | va_end (ap); | ... | ... |
-
Please register or sign in to post a comment