summaryrefslogtreecommitdiffabout
path: root/src/main.c
authorSergey Poznyakoff <gray@gnu.org.ua>2007-04-28 09:48:40 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2007-04-28 09:48:40 (GMT)
commit22bf9913a1831690504a0ff1c43c209c5f258cea (patch) (side-by-side diff)
treea37de21a742386bdf4a4f9a1d585520aa9171149 /src/main.c
parentb49ef04125f27858ffafd8be38f1e73d81fb1c27 (diff)
downloadmailfromd-22bf9913a1831690504a0ff1c43c209c5f258cea.tar.gz
mailfromd-22bf9913a1831690504a0ff1c43c209c5f258cea.tar.bz2
Bugfixes
git-svn-id: file:///svnroot/mailfromd/trunk@1389 7a8a7f39-df28-0410-adc6-e0d955640f24
Diffstat (limited to 'src/main.c') (more/less context) (ignore whitespace changes)
-rw-r--r--src/main.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c
index 56aa2af..d389ec4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -805,7 +805,7 @@ enum mailfromd_option {
OPTION_DUMP_XREF,
OPTION_EXPIRE,
OPTION_FOREGROUND,
- OPTION_DEBUG_GACOPYZ,
+ OPTION_GACOPYZ_LOG,
OPTION_IGNORE_FAILED_READS,
OPTION_LINT,
OPTION_LOG_TAG,
@@ -958,8 +958,8 @@ static struct argp_option options[] = {
{ "xref", OPTION_DUMP_XREF, NULL, 0,
N_("Produce a cross-reference listing"), GRP+1 },
{ "dump-xref", 0, NULL, OPTION_ALIAS, NULL, GRP+1 },
- { "gacopyz-debug", OPTION_DEBUG_GACOPYZ, NULL, 0,
- N_("Milter protocol trace"), GRP+1 },
+ { "gacopyz-log", OPTION_GACOPYZ_LOG, N_("LEVEL"), 0,
+ N_("Set Gacopyz log level"), GRP+1 },
{ "stderr", 's', NULL, 0,
N_("Log to stderr"), GRP+1 },
{ "syslog", OPTION_SYSLOG, NULL, 0,
@@ -1201,9 +1201,15 @@ parse_opt (int key, char *arg, struct argp_state *state)
foreground = 1;
break;
- case OPTION_DEBUG_GACOPYZ:
- smfi_setdbg(1);
+ case OPTION_GACOPYZ_LOG:
+ {
+ int lev = gacopyz_string_to_log_level(arg);
+ if (lev == -1)
+ argp_error(state, "%s: invalid Gacopyz log level",
+ arg);
+ smfi_setlogmask(SMI_LOG_FROM(lev));
break;
+ }
case OPTION_LIST:
need_config = 0;
@@ -1259,7 +1265,11 @@ parse_opt (int key, char *arg, struct argp_state *state)
case OPTION_TRACE_PROGRAM:
enable_prog_trace(arg ? arg: "all");
break;
-
+
+ case ARGP_KEY_INIT:
+ smfi_setlogmask(SMI_LOG_FROM(SMI_LOG_WARN));
+ break;
+
case ARGP_KEY_FINI:
if (validate_options())
exit(EX_USAGE);

Return to:

Send suggestions and report system problems to the System administrator.