(messages are logged to syslog using a specified name). Any other value is
interpreted as a filename to which messages should be written.
+.. note::
+
+ As of Kea 2.7.9, log files may only be written to the output directory
+ determined during compilation as: ``"[kea-install-dir]/var/log/kea"``. This
+ path may be overridden at startup by setting the environment variable
+ ``KEA_LOG_FILE_DIR`` to the desired path. If a path other than
+ this value is used in ``output``, Kea will emit an error and refuse to start
+ or, if already running, log an unrecoverable error. For ease of use simply
+ omit the path component from ``output`` and specify only the file name.
+
+
The ``flush`` (boolean) Option
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
. "@abs_top_builddir@/src/lib/testutils/dhcp_test_lib.sh"
export KEA_DHCP_DATA_DIR="@abs_top_builddir@/src/bin/admin/tests"
+export KEA_LOG_FILE_DIR="@abs_top_builddir@/src/bin/admin/tests"
+
# Locations of memfile tools
kea_admin="@abs_top_builddir@/src/bin/admin/kea-admin"
DdnsParamsPtr HooksDhcpv6SrvTest::callback_ddns_params_;
/// @brief Fixture class used to do basic library load/unload tests
-class LoadUnloadDhcpv6SrvTest : public BaseServerTest /*::testing::Test */ {
+class LoadUnloadDhcpv6SrvTest : public BaseServerTest {
public:
/// @brief Pointer to the tested server object
boost::shared_ptr<NakedDhcpv6Srv> server_;
LEASE_FILE="@abs_top_builddir@/src/bin/shell/tests/test_leases.csv"
# Path to the Dhcp4 Server log file.
+export KEA_LOG_FILE_DIR="@abs_top_builddir@/src/bin/shell/tests"
LOG_FILE="@abs_top_builddir@/src/bin/shell/tests/test.log"
# Dhcp4 Server configuration to be stored in the configuration file.
LEASE_FILE="@abs_top_builddir@/src/bin/shell/tests/test_leases.csv"
# Path to the Dhcp6 Server log file.
+export KEA_LOG_FILE_DIR="@abs_top_builddir@/src/bin/shell/tests"
LOG_FILE="@abs_top_builddir@/src/bin/shell/tests/test.log"
# Dhcp6 Server configuration to be stored in the configuration file.
} catch (const std::exception& ex) {
LOG_ERROR(dhcpsrv_logger, DHCPSRV_MEMFILE_FAILED_TO_OPEN)
.arg(ex.what());
- throw ex;
+ throw;
}
}
dhcp_data_dir = @runstatedir@/@PACKAGE@
AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
AM_CPPFLAGS += -DPIDFILE_DIR="\"$(dhcp_data_dir)\""
+log_file_dir = @localstatedir@/log/@PACKAGE@
+AM_CPPFLAGS += -DLOGFILE_DIR="\"$(log_file_dir)\""
AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS = $(KEA_CXXFLAGS)