diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-04-22 21:54:56 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-04-22 21:54:56 +0200 |
commit | c8a331c8000004ff68422e034332890c002b04c3 (patch) | |
tree | a4d83a932753d8134cb36d3f7e486a36f89ee9e4 /src/ConfigParser.cpp | |
parent | 96635c032658cc3d45007c02a0701a5961a40c39 (diff) | |
download | dabmod-c8a331c8000004ff68422e034332890c002b04c3.tar.gz dabmod-c8a331c8000004ff68422e034332890c002b04c3.tar.bz2 dabmod-c8a331c8000004ff68422e034332890c002b04c3.zip |
Take some Log improvements from ODR-DabMux
Diffstat (limited to 'src/ConfigParser.cpp')
-rw-r--r-- | src/ConfigParser.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp index 350c278..c90b150 100644 --- a/src/ConfigParser.cpp +++ b/src/ConfigParser.cpp @@ -123,8 +123,7 @@ static void parse_configfile( // log parameters: if (pt.GetInteger("log.syslog", 0) == 1) { - LogToSyslog* log_syslog = new LogToSyslog(); - etiLog.register_backend(log_syslog); + etiLog.register_backend(make_shared<LogToSyslog>()); } if (pt.GetInteger("log.filelog", 0) == 1) { @@ -138,14 +137,12 @@ static void parse_configfile( throw std::runtime_error("Configuration error"); } - LogToFile* log_file = new LogToFile(logfilename); - etiLog.register_backend(log_file); + etiLog.register_backend(make_shared<LogToFile>(logfilename)); } std::string trace_filename = pt.Get("log.trace", ""); if (not trace_filename.empty()) { - LogTracer* tracer = new LogTracer(trace_filename); - etiLog.register_backend(tracer); + etiLog.register_backend(make_shared<LogTracer>(trace_filename)); } |