From 76a4acdb380b0b3d78cdc7bb149e5f96b2cabf63 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Mon, 14 Feb 2011 13:37:59 +0200 Subject: Initialize both tntnet and cxxtools logging earlier and add all possible log level values into the command-line help. --- setup.cpp | 2 +- tntconfig.cpp | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/setup.cpp b/setup.cpp index 2fc8d62..9778805 100644 --- a/setup.cpp +++ b/setup.cpp @@ -109,7 +109,7 @@ char const* Setup::CommandLineHelp() const << " -c CERT, --cert=CERT full path to a custom ssl certificate file\n" << " -k KEY, --key=KEY full path to a custom ssl certificate key file\n" #endif - << " -l level, --log=level log level for tntnet (values: INFO, DEBUG,...)\n" + << " -l level, --log=level log level for tntnet (values: WARN, ERROR, INFO, DEBUG, TRACE)\n" << " -e , --epgimages= directory for epgimages\n"; m_helpString = builder.str(); } diff --git a/tntconfig.cpp b/tntconfig.cpp index bf811f1..96db7aa 100644 --- a/tntconfig.cpp +++ b/tntconfig.cpp @@ -148,6 +148,7 @@ namespace vdrlive { // XXX modularize file << "rootLogger=" << LiveSetup().GetTntnetLogLevel() << endl; file << "logger.tntnet=" << LiveSetup().GetTntnetLogLevel() << endl; + file << "logger.cxxtools=" << LiveSetup().GetTntnetLogLevel() << endl; } #endif @@ -156,6 +157,13 @@ namespace vdrlive { { string const configDir(Plugin::GetConfigDirectory()); + std::istringstream logConf( + "rootLogger=" + LiveSetup().GetTntnetLogLevel() + "\n" + "logger.tntnet=" + LiveSetup().GetTntnetLogLevel() + "\n" + "logger.cxxtools=" + LiveSetup().GetTntnetLogLevel() + "\n" + ); + log_init(logConf); + // +++ CAUTION +++ CAUTION +++ CAUTION +++ CAUTION +++ CAUTION +++ // ------------------------------------------------------------------------ // These mapUrl statements are very security sensitive! @@ -290,13 +298,6 @@ namespace vdrlive { esyslog( "[live] ERROR: Unable to load cert/key (%s/%s): %s", s_cert.c_str(), s_key.c_str(), strerror( errno ) ); } #endif // TNT_SSL_SUPPORT - - std::istringstream logConf( - "rootLogger=" + LiveSetup().GetTntnetLogLevel() + "\n" - // "logger.tntnet.static=DEBUG\n" - // "logger.cxxtools.net.tcp=DEBUG\n" - ); - log_init(logConf); } #endif -- cgit v1.2.3