aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-03-25 02:39:15 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-03-25 02:39:15 +0100
commit829772d3c4ad21c8cae8d37a6fa2e532c0c5ed19 (patch)
treef45fd1cc592571bd67186df793543ac9df26a655 /openbsc
parent9cc020ab21e2927869570f088c88782cf0d5689a (diff)
bsc_hack: Add option to set the global log level.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/bsc_hack.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/openbsc/src/bsc_hack.c b/openbsc/src/bsc_hack.c
index f18f7f835..c95bbe2f2 100644
--- a/openbsc/src/bsc_hack.c
+++ b/openbsc/src/bsc_hack.c
@@ -82,6 +82,7 @@ static void print_help()
printf(" -p --pcap file The filename of the pcap file\n");
printf(" -T --timestamp Prefix every log line with a timestamp\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 +110,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 +145,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");