diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-12-03 18:21:13 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-12-04 15:57:37 +0000 |
commit | 2d085e290bbe0ebf1b666aab4d4e0af9c17c1a58 (patch) | |
tree | a77430c8bfdbf11813800d630064c3e74b9efc70 /Transceiver52M | |
parent | 5cea18e5cbb1194b15df09f822345524380b94d2 (diff) |
osmo-trx: Change some lines to use libosmocore logging instead of cout
Change-Id: I66e3c37014ba12cd002e5b678bc0a6026f5dfc7e
Diffstat (limited to 'Transceiver52M')
-rw-r--r-- | Transceiver52M/osmo-trx.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp index b6b676e..2b69da4 100644 --- a/Transceiver52M/osmo-trx.cpp +++ b/Transceiver52M/osmo-trx.cpp @@ -398,7 +398,7 @@ static int set_sched_rr(unsigned int prio) int rc; memset(¶m, 0, sizeof(param)); param.sched_priority = prio; - printf("Setting SCHED_RR priority(%d)\n", param.sched_priority); + LOG(INFO) << "Setting SCHED_RR priority " << param.sched_priority; rc = sched_setscheduler(getpid(), SCHED_RR, ¶m); if (rc != 0) { LOG(ERROR) << "Config: Setting SCHED_RR failed"; @@ -441,12 +441,12 @@ static void print_config(struct trx_ctx *trx) } ost << std::endl; - std::cout << ost << std::endl; + LOG(INFO) << ost << std::endl; } static void trx_stop() { - std::cout << "Shutting down transceiver..." << std::endl; + LOG(NOTICE) << "Shutting down transceiver..." << std::endl; delete transceiver; delete radio; @@ -489,7 +489,7 @@ static int trx_start(struct trx_ctx *trx) goto shutdown; chans = transceiver->numChans(); - std::cout << "-- Transceiver active with " + LOG(NOTICE) << "-- Transceiver active with " << chans << " channel(s)" << std::endl; return 0; @@ -564,7 +564,7 @@ int main(int argc, char *argv[]) g_ctrlh = ctrl_interface_setup(NULL, OSMO_CTRL_PORT_TRX, NULL); if (!g_ctrlh) { - fprintf(stderr, "Failed to create CTRL interface.\n"); + LOG(ERROR) << "Failed to create CTRL interface.\n"; exit(1); } |