# Kea configuration backend section
-# Currently there are 2 backends available: BIND10 and JSON
+# Currently there are 2 backends available: BUNDY and JSON
# It is possible that we may extend this to accept additional backends.
AC_ARG_WITH(kea-config,
AC_HELP_STRING([--with-kea-config],
- [Selects configuration backend; currently available options are: BIND10 (default) or JSON]),
+ [Selects configuration backend; currently available options are: BUNDY (default) or JSON]),
[CONFIG_BACKEND="$withval"],
- [CONFIG_BACKEND=BIND10])
+ [CONFIG_BACKEND=BUNDY])
-AM_CONDITIONAL(CONFIG_BACKEND_BIND10, test "x$CONFIG_BACKEND" = "xBIND10")
+AM_CONDITIONAL(CONFIG_BACKEND_BUNDY, test "x$CONFIG_BACKEND" = "xBUNDY")
AM_CONDITIONAL(CONFIG_BACKEND_JSON, test "x$CONFIG_BACKEND" = "xJSON")
-if test "x$CONFIG_BACKEND" = "xBIND10"; then
- AC_DEFINE(CONFIG_BACKEND_BIND10, 1, [Define to 1 if Kea config was set to BIND10])
+if test "x$CONFIG_BACKEND" = "xBUNDY"; then
+ AC_DEFINE(CONFIG_BACKEND_BUNDY, 1, [Define to 1 if Kea config was set to BUNDY])
fi
if test "x$CONFIG_BACKEND" = "xJSON"; then
fi
# Let's sanity check if the specified backend value is allowed
-if test "x$CONFIG_BACKEND" != "xBIND10" && test "x$CONFIG_BACKEND" != "xJSON"; then
- AC_MSG_ERROR("Invalid configuration backend specified: $CONFIG_BACKEND. The only supported are: BIND10 JSON")
+if test "x$CONFIG_BACKEND" != "xBUNDY" && test "x$CONFIG_BACKEND" != "xJSON"; then
+ AC_MSG_ERROR("Invalid configuration backend specified: $CONFIG_BACKEND. The only supported are: BUNDY JSON")
fi
AC_ARG_ENABLE(generate_docs, [AC_HELP_STRING([--enable-generate-docs],
Kea config backend:
CONFIG_BACKEND: ${CONFIG_BACKEND}
-
END
# Avoid confusion on DNS/DHCP and only mention MySQL if it
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_srcdir)/src/bin -I$(top_builddir)/src/bin
AM_CPPFLAGS += -I$(top_srcdir)/src/lib/cc -I$(top_builddir)/src/lib/cc
+AM_CPPFLAGS += -DTOP_BUILDDIR="\"$(top_builddir)\""
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(B10_CXXFLAGS)
b10_dhcp6_SOURCES += ctrl_dhcp6_srv.cc ctrl_dhcp6_srv.h
b10_dhcp6_SOURCES += json_config_parser.cc json_config_parser.h
-if CONFIG_BACKEND_BIND10
+if CONFIG_BACKEND_BUNDY
b10_dhcp6_SOURCES += bundy_backend.cc
endif
}
}
+void
+Daemon::loggerInit(const char* log_name, bool verbose, bool stand_alone) {
+ isc::log::initLogger(log_name,
+ (verbose ? isc::log::DEBUG : isc::log::INFO),
+ isc::log::MAX_DEBUG_LEVEL, NULL, !stand_alone);
+}
+
}; // end of isc::dhcp namespace
}; // end of isc namespace
#include <dhcp6/ctrl_dhcp6_srv.h>
#include <dhcp6/dhcp6_log.h>
#include <dhcp6/spec_config.h>
+#include <log/logger_level.h>
+#include <log/logger_name.h>
+#include <log/logger_manager.h>
+#include <log/logger_specification.h>
+#include <log/logger_support.h>
+#include <log/output_option.h>
#include <exceptions/exceptions.h>
#include <util/buffer.h>
// Nothing to do here. No need to disconnect from anything.
}
+/// This is a logger initialization for JSON file backend.
+/// For now, it's just setting log messages to be printed on stdout.
+/// @todo: Implement this properly (see #3427)
+void Daemon::loggerInit(const char* log_name, bool verbose, bool ) {
+ // This method configures logger. For now it is very simple.
+ // We'll make it more robust once we add support for JSON-based logging
+ // configuration.
+
+ using namespace isc::log;
+
+ Severity severity = b10LoggerSeverity(verbose ? isc::log::DEBUG : isc::log::INFO);
+
+ // Set a directory for creating lockfiles when running tests
+ // @todo: Find out why this is needed. Without this, the logger doesn't
+ // work.
+ setenv("B10_LOCKFILE_DIR_FROM_BUILD", TOP_BUILDDIR, 1);
+
+ // Initialize logging
+ initLogger(log_name, severity, isc::log::MAX_DEBUG_LEVEL, NULL);
+
+ // Now configure logger output to stdout.
+ /// @todo: Make this configurable as part of #3427.
+ LoggerSpecification spec(log_name, severity,
+ b10LoggerDbglevel(isc::log::MAX_DEBUG_LEVEL));
+ OutputOption option;
+ option.destination = OutputOption::DEST_CONSOLE;
+ option.stream = OutputOption::STR_STDOUT;
+
+ spec.addOutputOption(option);
+ LoggerManager manager;
+ manager.process(spec);
+}
+
};
};
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_builddir)/src/bin # for generated spec_config.h header
AM_CPPFLAGS += -I$(top_srcdir)/src/bin
+AM_CPPFLAGS += -DTOP_BUILDDIR="\"$(top_builddir)\""
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
dhcp6_unittests_SOURCES += ../json_config_parser.cc ../json_config_parser.h
dhcp6_unittests_SOURCES += config_parser_unittest.cc
-if CONFIG_BACKEND_BIND10
+if CONFIG_BACKEND_BUNDY
# For Bundy backend, we only need to run the usual tests. There are no
-# Bundy-specific tests.
+# Bundy-specific tests yet.
dhcp6_unittests_SOURCES += ../bundy_backend.cc
dhcp6_unittests_SOURCES += bundy_backend_unittest.cc
endif
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
-#include <log/logger_level.h>
-#include <log/logger_name.h>
-#include <log/logger_manager.h>
-#include <log/logger_specification.h>
-#include <log/logger_support.h>
-#include <log/output_option.h>
#include <dhcpsrv/daemon.h>
#include <exceptions/exceptions.h>
#include <errno.h>
Daemon::~Daemon() {
}
-void Daemon::loggerInit(const char* log_name, bool verbose, bool ) {
- // This method configures logger. For now it is very simple.
- // We'll make it more robust once we add support for JSON-based logging
- // configuration.
-
- using namespace isc::log;
-
- Severity severity = b10LoggerSeverity(verbose ? isc::log::DEBUG : isc::log::INFO);
-
- // Set a directory for creating lockfiles when running tests
- // @todo: Find out why this is needed. Without this, the logger doesn't
- // work.
- setenv("B10_LOCKFILE_DIR_FROM_BUILD", TOP_BUILDDIR, 1);
-
- // Initialize logging
- initLogger(log_name, severity, isc::log::MAX_DEBUG_LEVEL, NULL);
-
- // Now configure logger output to stdout.
- /// @todo: Make this configurable as part of #3427.
- LoggerSpecification spec(log_name, severity,
- b10LoggerDbglevel(isc::log::MAX_DEBUG_LEVEL));
- OutputOption option;
- option.destination = OutputOption::DEST_CONSOLE;
- option.stream = OutputOption::STR_STDOUT;
-
- spec.addOutputOption(option);
- LoggerManager manager;
- manager.process(spec);
-}
-
};
};