Browse Source

[3755] Add started message to log output

Add a message that indicates when the v4 or v6 server
has completed processing its configuration and is about
to enter the loop to process dhcp messages.
Shawn Routhier 10 years ago
parent
commit
fbe5fe78c7

+ 5 - 0
src/bin/dhcp4/dhcp4_messages.mes

@@ -371,6 +371,11 @@ core component within the DHCPv4 server (the Dhcpv4 server object)
 has failed.  As a result, the server will exit.  The reason for the
 failure is given within the message.
 
+% DHCP4_STARTED Kea DHCPv4 server version %1 started
+This informational message indicates that the DHCPv4 server has
+processed all configuration information and is ready to process
+DHCPv4 packets.  The version is also printed.
+
 % DHCP4_STARTING Kea DHCPv4 server version %1 starting
 This informational message indicates that the DHCPv4 server has
 processed any command-line switches and is starting. The version

+ 4 - 1
src/bin/dhcp4/main.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2012, 2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011-2012, 2014-2015 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -161,6 +161,9 @@ main(int argc, char* argv[]) {
             return (EXIT_FAILURE);
         }
 
+        // Tell the admin we are ready to process packets
+        LOG_INFO(dhcp4_logger, DHCP4_STARTED).arg(VERSION);
+
         // And run the main loop of the server.
         server.run();
 

+ 5 - 0
src/bin/dhcp6/dhcp6_messages.mes

@@ -550,6 +550,11 @@ standalone mode, not connected to the message queue.  Standalone mode
 is only useful during program development, and should not be used in a
 production environment.
 
+% DHCP6_STARTED Kea DHCPv6 server version %1 started
+This informational message indicates that the IPv6 DHCP server has
+processed all configuration information and is ready to process
+DHCPv6 packets.  The version is also printed.
+
 % DHCP6_STARTING Kea DHCPv6 server version %1 starting
 This informational message indicates that the IPv6 DHCP server has
 processed any command-line switches and is starting. The version

+ 4 - 1
src/bin/dhcp6/main.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -164,6 +164,9 @@ main(int argc, char* argv[]) {
             return (EXIT_FAILURE);
         }
 
+        // Tell the admin we are ready to process packets
+        LOG_INFO(dhcp6_logger, DHCP6_STARTED).arg(VERSION);
+
         // And run the main loop of the server.
         server.run();