bsc_hack: Add option to set the global log level.
diff --git a/openbsc/src/bsc_hack.c b/openbsc/src/bsc_hack.c
index f18f7f8..c95bbe2 100644
--- a/openbsc/src/bsc_hack.c
+++ b/openbsc/src/bsc_hack.c
@@ -82,6 +82,7 @@
 	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 @@
 			{"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 @@
 		case 'P':
 			ipacc_rtp_direct = 0;
 			break;
+		case 'e':
+			debug_set_log_level(stderr_target, atoi(optarg));
+			break;
 		case 'V':
 			print_version();
 			printf("\n");