client: fix stderror logging in unit-test

When testing the file name and the line numbers are output to
stderr, this causes the test to fail when change moves the
lines.

Disable line numbers in the stderror log when testing, also
disable timestamps and colors. Make sure the log category
is print.

Change-Id: I7f1bd9454188f0ca869dada1fcc2877b789cc0ac
This commit is contained in:
Philipp Maier 2017-10-25 12:14:13 +02:00
parent d8d7b4b188
commit 8348abb372
1 changed files with 4 additions and 0 deletions

View File

@ -163,6 +163,10 @@ int main(int argc, char **argv)
ctx = talloc_named_const(NULL, 1, "mgcp_client_test");
msgb_talloc_ctx_init(ctx, 0);
osmo_init_logging(&log_info);
log_set_print_filename(osmo_stderr_target, 0);
log_set_print_timestamp(osmo_stderr_target, 0);
log_set_use_color(osmo_stderr_target, 0);
log_set_print_category(osmo_stderr_target, 1);
mgcp_client_conf_init(&conf);