path: root/libsieve
diff options
authorSergey Poznyakoff <>2007-11-29 14:45:38 +0000
committerSergey Poznyakoff <>2007-11-29 14:45:38 +0000
commitcec83dcab0f70d789b977ab53be8d0e391ad11f2 (patch)
tree5085a61289cdc8b14401d9520ca32e8489845c1d /libsieve
parenta3a31df1d1c1606c5e20409289d1161bdcc5dfd9 (diff)
* comsat/action.c, comsat/comsat.c, imap4d/auth_gsasl.c,
imap4d/auth_gss.c, imap4d/authenticate.c, imap4d/bye.c, imap4d/close.c, imap4d/imap4d.c, imap4d/login.c, imap4d/search.c, imap4d/signal.c, imap4d/starttls.c, imap4d/util.c, maidag/lmtp.c, maidag/maidag.c, maidag/script.c, mail.local/main.c, mail.local/script.c, pop3d/apop.c, pop3d/bulletin.c, pop3d/extra.c, pop3d/lock.c, pop3d/logindelay.c, pop3d/pop3d.c, pop3d/quit.c, pop3d/signal.c, pop3d/user.c, libsieve/util.c: Use mu_diag_output instead of syslog. * sieve/sieve.c: New option --no-program-name, for testsuite. * sieve/testsuite/lib/sieve.exp: Call sieve with the --no-program-name option. * mailbox/cfg_lexer.c, mailbox/cfg_parser.y: Improve debugging. * mailbox/diag.c: New file. * mailbox/gdebug.c (mu_debug_level_from_string): New function. * mailbox/muerror.c (mu_verror, mu_error): Rewrite using mu_diag functions. * mailbox/syslog.c (mu_diag_level_to_syslog): New function. (mu_diag_syslog_printer): New function. * mh/mh_argp.c (mh_argp_parse): Set prigram name using mu_set_program_name. * mh/mh_init.c (mu_error_printer): No longer needed. * movemail/movemail.c (movemail_error_printer): No longer needed. * include/mailutils/ (pkginclude_HEADERS): Add diag.h * include/mailutils/diag.h: New file. * include/mailutils/cfg.h (mu_cfg_lexer_t): Take mu_debug_t as its second argument. * include/mailutils/error.h: Include diag.h (mu_program_name,mu_set_program_name): Remove. Already declared in diag.h. (mu_error_set_print): Deprecated. * mailbox/ (libmailutils_la_SOURCES): Add diag.c
Diffstat (limited to 'libsieve')
1 files changed, 7 insertions, 3 deletions
diff --git a/libsieve/util.c b/libsieve/util.c
index 6fe51527d..609afbc16 100644
--- a/libsieve/util.c
+++ b/libsieve/util.c
@@ -277,10 +277,14 @@ int
_sieve_default_parse_error (void *unused, const char *filename, int lineno,
const char *fmt, va_list ap)
+ mu_debug_t debug;
+ mu_diag_get_debug (&debug);
if (filename)
- fprintf (stderr, "%s:%d: ", filename, lineno);
- vfprintf (stderr, fmt, ap);
- fprintf (stderr, "\n");
+ mu_debug_set_locus (debug, filename, lineno);
+ mu_diag_vprintf (MU_DIAG_ERROR, fmt, ap);
+ mu_diag_printf (MU_DIAG_ERROR, "\n");
+ mu_debug_set_locus (debug, NULL, 0);
return 0;

Return to:

Send suggestions and report system problems to the System administrator.