aboutsummaryrefslogtreecommitdiffstats
path: root/src/DabMux.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-01-24 18:27:05 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-01-24 18:27:05 +0100
commit561aae3b03cec35e14e529f0006155ee3db07df5 (patch)
treebeb5cbb02fcb33aa762afc91cf8d1e29c216c651 /src/DabMux.cpp
parent8028302eb5b5f6ea77e57887f3b31bd9abafeb27 (diff)
downloaddabmux-561aae3b03cec35e14e529f0006155ee3db07df5.tar.gz
dabmux-561aae3b03cec35e14e529f0006155ee3db07df5.tar.bz2
dabmux-561aae3b03cec35e14e529f0006155ee3db07df5.zip
Initialise syslog earlier, don't leak the syslog backend
Diffstat (limited to 'src/DabMux.cpp')
-rw-r--r--src/DabMux.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/DabMux.cpp b/src/DabMux.cpp
index 069af48..3870df5 100644
--- a/src/DabMux.cpp
+++ b/src/DabMux.cpp
@@ -3,7 +3,7 @@
2011, 2012 Her Majesty the Queen in Right of Canada (Communications
Research Center Canada)
- Copyright (C) 2016
+ Copyright (C) 2017
Matthias P. Braendli, matthias.braendli@mpb.li
http://www.opendigitalradio.org
@@ -235,6 +235,11 @@ int main(int argc, char *argv[])
throw MuxInitException("No configuration file specified");
}
+ /* Enable Logging to syslog conditionally */
+ if (pt.get<bool>("general.syslog", false)) {
+ etiLog.register_backend(std::make_shared<LogToSyslog>());
+ }
+
int mgmtserverport = pt.get<int>("general.managementport",
pt.get<int>("general.statsserverport", 0) );