Skip to content

Commit

Permalink
mxqd: Add --debug option
Browse files Browse the repository at this point in the history
  • Loading branch information
mariux committed Jul 26, 2015
1 parent be14957 commit d819f92
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mxqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ static void print_usage(void)
" --pid-file <pidfile> default: create no pid file\n"
" --daemonize default: run in foreground\n"
" --no-log default: write a logfile\n"
" --debug default: info log level\n"
"\n"
" -V | --version\n"
" -h | --help\n"
Expand Down Expand Up @@ -215,6 +216,7 @@ int server_init(struct mxq_server *server, int argc, char *argv[])
MX_OPTION_NO_ARG("version", 'V'),
MX_OPTION_NO_ARG("daemonize", 1),
MX_OPTION_NO_ARG("no-log", 3),
MX_OPTION_NO_ARG("debug", 5),
MX_OPTION_REQUIRED_ARG("pid-file", 2),
MX_OPTION_REQUIRED_ARG("slots", 'j'),
MX_OPTION_REQUIRED_ARG("memory", 'm'),
Expand Down Expand Up @@ -258,6 +260,10 @@ int server_init(struct mxq_server *server, int argc, char *argv[])
arg_nolog = 1;
break;

case 5:
mx_log_level_set(MX_LOG_DEBUG);
break;

case 'V':
print_version();
exit(EX_USAGE);
Expand Down

0 comments on commit d819f92

Please sign in to comment.