aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/oap/oap_client_test.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-12-09 00:01:56 +0100
committerHarald Welte <laforge@gnumonks.org>2016-12-13 14:54:02 +0000
commit73ed45599b94f666fedd043028daad9427c241bd (patch)
tree0c656d9798f7b72691c688133f73b80457b374d8 /openbsc/tests/oap/oap_client_test.c
parent2e109f08c07ca7ca5bc0f134d561cad42840b27c (diff)
oap_client: move logging to DLOAP logging category
Use libosmocore's DLOAP logging category for OAP. oap_client_test.c: make sure DLOAP is in DEBUG level to not lose any logging messages from experr. Todo: we're using a "Library" logging category, which is not really what the library category was intended for. Instead, the OAP client should probably be given a logging category like DVLR or DGPRS in its initialization API. Related: OS#1592 Change-Id: Ic765c19381b0d983da90a5d8aee9cd17e31cf34a
Diffstat (limited to 'openbsc/tests/oap/oap_client_test.c')
-rw-r--r--openbsc/tests/oap/oap_client_test.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/openbsc/tests/oap/oap_client_test.c b/openbsc/tests/oap/oap_client_test.c
index 147314689..a54e3869c 100644
--- a/openbsc/tests/oap/oap_client_test.c
+++ b/openbsc/tests/oap/oap_client_test.c
@@ -213,17 +213,12 @@ static void test_oap_api(void)
msgb_free(msg_rx);
}
-static struct log_info_cat gprs_categories[] = {
- [DGPRS] = {
- .name = "DGPRS",
- .description = "GPRS Packet Service",
- .enabled = 1, .loglevel = LOGL_DEBUG,
- },
+static struct log_info_cat oap_client_test_categories[] = {
};
static struct log_info info = {
- .cat = gprs_categories,
- .num_cat = ARRAY_SIZE(gprs_categories),
+ .cat = oap_client_test_categories,
+ .num_cat = ARRAY_SIZE(oap_client_test_categories),
};
int main(int argc, char **argv)
@@ -232,10 +227,11 @@ int main(int argc, char **argv)
osmo_init_logging(&info);
OSMO_ASSERT(osmo_stderr_target);
- osmo_stderr_target->use_color = 0;
- osmo_stderr_target->print_timestamp = 0;
- osmo_stderr_target->print_filename = 0;
- osmo_stderr_target->print_category = 1;
+ log_set_use_color(osmo_stderr_target, 0);
+ log_set_print_timestamp(osmo_stderr_target, 0);
+ log_set_print_filename(osmo_stderr_target, 0);
+ log_set_print_category(osmo_stderr_target, 1);
+ log_parse_category_mask(osmo_stderr_target, "DLOAP,1");
test_oap_api();
printf("Done\n");