move log/debug codebase to libosmocore
The logging/debugging code is generic enough to move it into libosmocore
while keeping OpenBSC specific definitions in openbsc itself.
This commit uses the logging support present in libosmocore-0.1.2,
you will have to update your library to this version.
diff --git a/openbsc/src/bs11_config.c b/openbsc/src/bs11_config.c
index 80f9ba9..884ec2c 100644
--- a/openbsc/src/bs11_config.c
+++ b/openbsc/src/bs11_config.c
@@ -71,7 +71,7 @@
static const u_int8_t too_fast[] = { 0x12, 0x80, 0x00, 0x00, 0x02, 0x02 };
-static struct debug_target *stderr_target;
+static struct log_target *stderr_target;
/* dummy function to keep gsm_data.c happy */
struct counter *counter_alloc(const char *name)
@@ -778,7 +778,7 @@
serial_port = optarg;
break;
case 'b':
- debug_parse_category_mask(stderr_target, optarg);
+ log_parse_category_mask(stderr_target, optarg);
break;
case 's':
fname_software = optarg;
@@ -834,10 +834,10 @@
struct gsm_network *gsmnet;
int rc;
- debug_init();
- stderr_target = debug_target_create_stderr();
- debug_add_target(stderr_target);
- debug_set_all_filter(stderr_target, 1);
+ log_init(&log_info);
+ stderr_target = log_target_create_stderr();
+ log_add_target(stderr_target);
+ log_set_all_filter(stderr_target, 1);
handle_options(argc, argv);
bts_model_bs11_init();