]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3422] Set logging destination in keactrl script.
authorMarcin Siodelski <marcin@isc.org>
Thu, 12 Jun 2014 13:58:13 +0000 (15:58 +0200)
committerMarcin Siodelski <marcin@isc.org>
Thu, 12 Jun 2014 13:58:13 +0000 (15:58 +0200)
src/bin/keactrl/keactrl.in

index 520ffef856f1dcfc4b48297f90781d16bc765ae0..c3cb58e13bd49dd02f7607b0e6270e0ba5d7e543 100644 (file)
@@ -103,6 +103,15 @@ as another instance is already running."
 
 ### Script starts here ###
 
+# Configure logger to log messages into the file.
+# Do not set destination if the B10_LOGGER_DESTINATION is set,
+# because a unit test could have set this to some other location.
+# @todo Rely on the Kea configuration file once #3427 is done.
+if [ -z ${B10_LOGGER_DESTINATION} ]; then
+    prefix=@prefix@
+    export B10_LOGGER_DESTINATION=@localstatedir@/@PACKAGE@/kea.log
+fi
+
 command=
 if [ $# -ne 1 ]; then
     log_error "No command specified. Use: start, stop, commit or status."