diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-02-20 20:01:10 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-02-27 07:11:11 +0000 |
commit | 3da1f8352e337fb032bf7a58c2909d3ba918e237 (patch) | |
tree | 33efd20443a363cd783da4dea99255210237097e /Transceiver52M | |
parent | 5ea1817dc299611808532eda489981f09f87cba3 (diff) |
Logger: Use libosmocore logging system
We still need an intermediate class Logger due to osmo-trx being
multi-threaded and requiring to have a lock to use libosmocore, which is
not thread safe.
Change-Id: I30baac89f53e927f8699d0586b43cccf88ecd493
Diffstat (limited to 'Transceiver52M')
-rw-r--r-- | Transceiver52M/osmo-trx.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp index 8e2088d..5f4e286 100644 --- a/Transceiver52M/osmo-trx.cpp +++ b/Transceiver52M/osmo-trx.cpp @@ -79,7 +79,6 @@ extern "C" { #define DEFAULT_CONFIG_FILE "osmo-trx.cfg" struct trx_config { - std::string log_level; std::string local_addr; std::string remote_addr; std::string dev_args; @@ -156,7 +155,6 @@ bool trx_setup_config(struct trx_config *config) std::ostringstream ost(""); ost << "Config Settings" << std::endl; - ost << " Log Level............... " << config->log_level << std::endl; ost << " Device args............. " << config->dev_args << std::endl; ost << " TRX Base Port........... " << config->port << std::endl; ost << " TRX Address............. " << config->local_addr << std::endl; @@ -311,7 +309,6 @@ static void print_help() fprintf(stdout, "Options:\n" " -h This text\n" " -a UHD device args\n" - " -l Logging level (%s)\n" " -i IP address of GSM core\n" " -j IP address of osmo-trx\n" " -p Base port number\n" @@ -330,8 +327,8 @@ static void print_help() " -S Swap channels (UmTRX only)\n" " -t SCHED_RR real-time priority (1..32)\n" " -y comma-delimited list of Tx paths (num elements matches -c)\n" - " -z comma-delimited list of Rx paths (num elements matches -c)\n", - "EMERG, ALERT, CRT, ERR, WARNING, NOTICE, INFO, DEBUG"); + " -z comma-delimited list of Rx paths (num elements matches -c)\n" + ); } static void handle_options(int argc, char **argv, struct trx_config *config) @@ -339,7 +336,6 @@ static void handle_options(int argc, char **argv, struct trx_config *config) int option; bool tx_path_set = false, rx_path_set = false; - config->log_level = "NOTICE"; config->local_addr = DEFAULT_TRX_IP; config->remote_addr = DEFAULT_TRX_IP; config->config_file = (char *)DEFAULT_CONFIG_FILE; @@ -361,7 +357,7 @@ static void handle_options(int argc, char **argv, struct trx_config *config) config->tx_paths = std::vector<std::string>(DEFAULT_CHANS, ""); config->rx_paths = std::vector<std::string>(DEFAULT_CHANS, ""); - while ((option = getopt(argc, argv, "ha:l:i:j:p:c:dmxgfo:s:b:r:A:R:Set:y:z:C:")) != -1) { + while ((option = getopt(argc, argv, "ha:i:j:p:c:dmxgfo:s:b:r:A:R:Set:y:z:C:")) != -1) { switch (option) { case 'h': print_help(); @@ -370,9 +366,6 @@ static void handle_options(int argc, char **argv, struct trx_config *config) case 'a': config->dev_args = optarg; break; - case 'l': - config->log_level = optarg; - break; case 'i': config->remote_addr = optarg; break; @@ -594,8 +587,6 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } - gLogInit(config.log_level.c_str()); - srandom(time(NULL)); /* Create the low level device object */ |