diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-01-24 18:27:05 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-01-24 18:27:05 +0100 |
commit | 561aae3b03cec35e14e529f0006155ee3db07df5 (patch) | |
tree | beb5cbb02fcb33aa762afc91cf8d1e29c216c651 /src/DabMux.cpp | |
parent | 8028302eb5b5f6ea77e57887f3b31bd9abafeb27 (diff) | |
download | dabmux-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.cpp | 7 |
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) ); |