diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-03-25 02:58:57 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-03-25 02:58:57 +0100 |
commit | 2008d3f54cac8d947406943b324193b2df97f41d (patch) | |
tree | 2ef865e2f98c7cda0421b3307b8ff27a5bb9b1fd /openbsc | |
parent | a26ebe40f5a30fef9fb4bc5b65eb58123d8102bb (diff) | |
parent | bb7bc1155fbef0be4218f3e95d37734cdc86bc3f (diff) |
Merge remote branch 'origin/master' into on-waves/bsc-master
Diffstat (limited to 'openbsc')
-rw-r--r-- | openbsc/src/bsc_hack.c | 11 | ||||
-rw-r--r-- | openbsc/src/debug.c | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/openbsc/src/bsc_hack.c b/openbsc/src/bsc_hack.c index f18f7f835..4cde4ddec 100644 --- a/openbsc/src/bsc_hack.c +++ b/openbsc/src/bsc_hack.c @@ -76,12 +76,15 @@ static void print_help() printf(" Some useful help...\n"); printf(" -h --help this text\n"); printf(" -d option --debug=DRLL:DCC:DMM:DRR:DRSL:DNM enable debugging\n"); - printf(" -s --disable-color\n"); printf(" -c --config-file filename The config file to use.\n"); + printf(" -s --disable-color\n"); printf(" -l --database db-name The database to use\n"); + printf(" -a --authorize-everyone. Authorize every new subscriber. Dangerous!.\n"); printf(" -p --pcap file The filename of the pcap file\n"); printf(" -T --timestamp Prefix every log line with a timestamp\n"); + printf(" -V --version. Print the version of OpenBSC.\n"); printf(" -P --rtp-proxy Enable the RTP Proxy code inside OpenBSC\n"); + printf(" -e --log-level number. Set a global loglevel.\n"); } static void print_version() @@ -109,10 +112,11 @@ static void handle_options(int argc, char** argv) {"timestamp", 0, 0, 'T'}, {"version", 0, 0, 'V' }, {"rtp-proxy", 0, 0, 'P'}, + {"log-level", 1, 0, 'e'}, {0, 0, 0, 0} }; - c = getopt_long(argc, argv, "hd:sl:ar:p:TPVc:", + c = getopt_long(argc, argv, "hd:sl:ar:p:TPVc:e:", long_options, &option_index); if (c == -1) break; @@ -143,6 +147,9 @@ static void handle_options(int argc, char** argv) case 'P': ipacc_rtp_direct = 0; break; + case 'e': + debug_set_log_level(stderr_target, atoi(optarg)); + break; case 'V': print_version(); printf("\n"); diff --git a/openbsc/src/debug.c b/openbsc/src/debug.c index cff59ca36..ed2b046cc 100644 --- a/openbsc/src/debug.c +++ b/openbsc/src/debug.c @@ -243,7 +243,7 @@ static void _debugp(unsigned int subsys, int level, char *file, int line, continue; /* Check the category log level */ - if (category->loglevel != 0 && level < category->loglevel) + if (tar->loglevel == 0 && category->loglevel != 0 && level < category->loglevel) continue; /* |