diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-01-12 21:54:07 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-01-12 21:54:07 +0100 |
commit | f1874c259259a039227517a9cd58d7017a1bef34 (patch) | |
tree | fb1cc85521a67d5efb05434fe78cb43a4098e03d /src/ParserConfigfile.cpp | |
parent | e9c4e1762c3b7531ffe82dc26c67919ee38bfc3a (diff) | |
download | dabmux-f1874c259259a039227517a9cd58d7017a1bef34.tar.gz dabmux-f1874c259259a039227517a9cd58d7017a1bef34.tar.bz2 dabmux-f1874c259259a039227517a9cd58d7017a1bef34.zip |
replace all occurrencies of TcpLog and old etiLog
Diffstat (limited to 'src/ParserConfigfile.cpp')
-rw-r--r-- | src/ParserConfigfile.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ParserConfigfile.cpp b/src/ParserConfigfile.cpp index dcf6733..ca9983b 100644 --- a/src/ParserConfigfile.cpp +++ b/src/ParserConfigfile.cpp @@ -174,9 +174,9 @@ void parse_configfile(string configuration_file, /* Number of frames to generate */ *limit = pt_general.get("nbframes", 0); - /* Enable TCPLog conditionally */ - if (pt_general.get("tcplog", 0)) { - etiLog.open("createETI", 0, 12222); + /* Enable Logging to syslog conditionally */ + if (pt_general.get("syslog", 0)) { + etiLog.register_backend(new LogToSyslog()); // TODO don't leak the LogToSyslog backend } *factumAnalyzer = pt_general.get("writescca", false); @@ -236,7 +236,7 @@ void parse_configfile(string configuration_file, set_short_label(service->label, label, "Service"); } catch (ptree_error &e) { - etiLog.printHeader(TcpLog::WARNING, + etiLog.log(warn, "Service with uid %s has no short label.\n", serviceuid.c_str()); } @@ -274,7 +274,7 @@ void parse_configfile(string configuration_file, setup_subchannel_from_ptree(subchan, it->second, ensemble, subchanuid); } catch (runtime_error &e) { - etiLog.printHeader(TcpLog::ERR, + etiLog.log(error, "%s\n", e.what()); throw e; } @@ -350,7 +350,7 @@ void parse_configfile(string configuration_file, component->label.flag = 0xff00; } catch (ptree_error &e) { - etiLog.printHeader(TcpLog::WARNING, + etiLog.log(warn, "Service with uid %s has no label.\n", componentuid.c_str()); } @@ -359,7 +359,7 @@ void parse_configfile(string configuration_file, set_short_label(component->label, label, "Component"); } catch (ptree_error &e) { - etiLog.printHeader(TcpLog::WARNING, + etiLog.log(warn, "Component with uid %s has no short label.\n", componentuid.c_str()); } @@ -482,12 +482,12 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan, subchan->operations = dabInputZmqOperations; } else if (strcmp(subchan->inputProto, "epmg") == 0) { - etiLog.printHeader(TcpLog::WARNING, + etiLog.log(warn, "Using untested epmg:// zeromq input\n"); subchan->operations = dabInputZmqOperations; } else if (strcmp(subchan->inputProto, "ipc") == 0) { - etiLog.printHeader(TcpLog::WARNING, + etiLog.log(warn, "Using untested ipc:// zeromq input\n"); subchan->operations = dabInputZmqOperations; #endif // defined(HAVE_INPUT_ZEROMQ) @@ -657,7 +657,7 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan, subchan->operations = dabInputEnhancedFifoOperations; #endif // defined(HAVE_FORMAT_EPM) } else { - etiLog.printHeader(TcpLog::ERR, + etiLog.log(error, "Error, wrong packet subchannel operations!\n"); throw runtime_error("Error, wrong packet subchannel operations!\n"); } @@ -674,7 +674,7 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan, dabInputDabplusFileOperations) { subchan->operations = dabInputDabplusFifoOperations; } else { - etiLog.printHeader(TcpLog::ERR, + etiLog.log(error, "Error, wrong audio subchannel operations!\n"); throw runtime_error( "Error, wrong audio subchannel operations!\n"); |