diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2018-06-04 22:51:50 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2018-06-04 22:51:50 +0200 |
commit | f08f519880261ec2bd72ba50bf5ff8600783fcd1 (patch) | |
tree | 05fdf6d9939261ea987d932dcde8b1f4acac6129 /src/options.c | |
parent | b882854c0dd614427ab5e1297c65cf1dace3a391 (diff) |
POTD skeleton #94.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/options.c b/src/options.c index 084751d..4b14bf1 100644 --- a/src/options.c +++ b/src/options.c @@ -1,5 +1,7 @@ #ifdef HAVE_CONFIG_H #include "config.h" +#else +#define POTD_LOGFILE "/tmp/potd.log" #endif #include <stdio.h> @@ -10,6 +12,7 @@ #include <getopt.h> #include "options.h" +#include "log.h" typedef enum opt_type { OT_INVALID = 0, OT_NOARG, OT_L, OT_LL, OT_STR, @@ -52,7 +55,7 @@ struct opt { static struct opt options[OPT_MAX+1] = { OPT_NOARG("log-to-file", "short_help", "help"), OPT(OT_PATH, .str = POTD_LOGFILE, "log-file", "short help", "help"), - OPT(OT_STR, .ll = 0, "log-level", "short help", "help"), + OPT(OT_STR, .ll = NOTICE, "log-level", "short help", "help"), OPT_NOARG("daemon", "short help", "help"), OPT_LIST(OT_STR, .ll = 0, "redirect", "short_help", "help"), OPT_LIST(OT_STR, .ll = 0, "protocol", "short_help", "help"), |