Commit 5db2c573 5db2c573a0dd277f25b1c05fa4bb952513889f25 by Sergey Poznyakoff

(mu_logging_param): Use callback to parse thefacility.

1 parent a13049b8
......@@ -89,8 +89,20 @@ DCL_CFG_CAPA (mailer);
/* Logging */
/* ************************************************************************* */
int
cb_facility (mu_cfg_locus_t *locus, void *data, char *arg)
{
if (mu_string_to_syslog_facility (arg, &logging_settings.facility))
{
mu_error (_("%s:%d: Unknown syslog facility `%s'"),
locus->file, locus->line, arg);
return 1;
}
return 0;
}
static struct mu_cfg_param mu_logging_param[] = {
{ "facility", mu_cfg_string, &logging_settings.facility },
{ "facility", mu_cfg_callback, NULL, cb_facility },
{ NULL }
};
......