summaryrefslogtreecommitdiffstats
path: root/src/host/layer23
diff options
context:
space:
mode:
Diffstat (limited to 'src/host/layer23')
-rw-r--r--src/host/layer23/src/common/main.c6
-rw-r--r--src/host/layer23/src/mobile/main.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/host/layer23/src/common/main.c b/src/host/layer23/src/common/main.c
index a4b94415..919a2315 100644
--- a/src/host/layer23/src/common/main.c
+++ b/src/host/layer23/src/common/main.c
@@ -58,6 +58,7 @@ static char *sap_socket_path = "/tmp/osmocom_sap";
struct llist_head ms_list;
static char *gsmtap_ip = NULL;
static char *config_file = NULL;
+static char *log_cat_mask = NULL;
int (*l23_app_start)(void) = NULL;
int (*l23_app_work)(void) = NULL;
@@ -162,7 +163,7 @@ static void handle_options(int argc, char **argv)
config_file = optarg;
break;
case 'd':
- log_parse_category_mask(osmo_stderr_target, optarg);
+ log_cat_mask = optarg;
break;
default:
if (l23_app_info.cfg_handle_opt != NULL)
@@ -268,6 +269,9 @@ int main(int argc, char **argv)
exit(1);
}
+ if (log_cat_mask != NULL)
+ log_parse_category_mask(osmo_stderr_target, log_cat_mask);
+
if (l23_app_info.opt_supported & L23_OPT_TAP) {
if (gsmtap_ip) {
if (l23_cfg.gsmtap.remote_host != NULL) {
diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c
index 71a16c11..8720ea76 100644
--- a/src/host/layer23/src/mobile/main.c
+++ b/src/host/layer23/src/mobile/main.c
@@ -54,6 +54,7 @@ void *l23_ctx = NULL;
struct l23_global_config l23_cfg;
struct llist_head ms_list;
static const char *custom_cfg_file = NULL;
+static const char *log_cat_mask = NULL;
static char *config_file = NULL;
char *config_dir = NULL;
int daemonize = 0;
@@ -118,7 +119,7 @@ static int handle_options(int argc, char **argv)
custom_cfg_file = optarg;
break;
case 'd':
- log_parse_category_mask(osmo_stderr_target, optarg);
+ log_cat_mask = optarg;
break;
case 'D':
daemonize = 1;
@@ -297,6 +298,9 @@ int main(int argc, char **argv)
exit(1);
}
+ if (log_cat_mask != NULL)
+ log_parse_category_mask(osmo_stderr_target, log_cat_mask);
+
if (l23_cfg.gsmtap.remote_host) {
l23_cfg.gsmtap.inst = gsmtap_source_init2(l23_cfg.gsmtap.local_host, 0,
l23_cfg.gsmtap.remote_host, GSMTAP_UDP_PORT, 1);