]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3401] Fixed Daemon::loggerInit implementation
authorThomas Markwalder <tmark@isc.org>
Thu, 5 Jun 2014 18:48:40 +0000 (14:48 -0400)
committerThomas Markwalder <tmark@isc.org>
Thu, 5 Jun 2014 18:48:40 +0000 (14:48 -0400)
Replaced Daemon::loggerInit with implemetation used by Dhcp6 so logging
output now goes to stdout.

src/bin/d2/d_controller.cc

index e01e3d36ce9c1b2ac9329fc8367e10366144d369..3152f30691a7e9b694b136319550a1a3af59a0b2 100644 (file)
@@ -338,9 +338,12 @@ DControllerBase::getConfigFileName() {
 // Provide an implementation until we figure out a better way to do this.
 void
 dhcp::Daemon::loggerInit(const char* log_name, bool verbose) {
-    isc::log::initLogger(log_name,
-                         (verbose ? isc::log::DEBUG : isc::log::INFO),
-                         isc::log::MAX_DEBUG_LEVEL, NULL, true);
+    setenv("B10_LOCKFILE_DIR_FROM_BUILD", "/tmp", 1);
+    setenv("B10_LOGGER_ROOT", log_name, 0);
+    setenv("B10_LOGGER_SEVERITY", (verbose ? "DEBUG":"INFO"), 0);
+    setenv("B10_LOGGER_DBGLEVEL", "99", 0);
+    setenv("B10_LOGGER_DESTINATION",  "stdout", 0);
+    isc::log::initLogger();
 }
 
 }; // namespace isc