# HG changeset patch # User Tero Marttila # Date 1238105303 -7200 # Node ID e26f972300e492262cd27ee581631f301ccb8c2c # Parent 941bb8379d3dd20054feb45fbdfa8bc6f765a1bc add --debug option to nexus diff -r 941bb8379d3d -r e26f972300e4 src/nexus.c --- a/src/nexus.c Thu Mar 26 23:59:04 2009 +0200 +++ b/src/nexus.c Fri Mar 27 00:08:23 2009 +0200 @@ -22,6 +22,7 @@ OPT_CHANNEL = 'c', OPT_MODULE = 'm', OPT_CONFIG = 'C', + OPT_DEBUG = 'd', /** Options without short names */ _OPT_EXT_BEGIN = 0x00ff, @@ -37,6 +38,7 @@ {"channel", 1, NULL, OPT_CHANNEL }, {"module", 1, NULL, OPT_MODULE }, {"config", 1, NULL, OPT_CONFIG }, + {"debug", 0, NULL, OPT_DEBUG }, {0, 0, 0, 0 }, }; @@ -52,6 +54,7 @@ printf(" --channel / -c add an IRC channel using ':' format\n"); printf(" --module / -m add a module using ':' format\n"); printf(" --config / -C add a module configuration option using ':[:]' format\n"); + printf(" --debug / -d set logging level to DEBUG\n"); } /** @@ -243,6 +246,10 @@ return ERROR_CODE(err); break; + + case OPT_DEBUG: + set_log_level(LOG_DEBUG); + break; case '?': usage(argv[0]);