Parcourir la source

[trac747] Shorten the message prefix

So the messages are shorter and the prefix itself doesn't contain an
underscore.
Michal 'vorner' Vaner il y a 14 ans
Parent
commit
ebe5d465d2

+ 3 - 3
src/lib/server_common/keyring.cc

@@ -32,7 +32,7 @@ updateKeyring(const std::string&, ConstElementPtr data,
               const isc::config::ConfigData&) {
     ConstElementPtr list(data->get("keys"));
     KeyringPtr load(new TSIGKeyRing);
-    LOG_DEBUG(logger, DBG_TRACE_BASIC, SRV_COMMON_KEYS_UPDATE);
+    LOG_DEBUG(logger, DBG_TRACE_BASIC, SRVCOMM_KEYS_UPDATE);
 
     // Note that 'data' only contains explicitly configured config parameters.
     // So if we use the default list is NULL, rather than an empty list, and
@@ -52,7 +52,7 @@ initKeyring(config::ModuleCCSession& session) {
         // We are already initialized
         return;
     }
-    LOG_DEBUG(logger, DBG_TRACE_BASIC, SRV_COMMON_KEYS_INIT);
+    LOG_DEBUG(logger, DBG_TRACE_BASIC, SRVCOMM_KEYS_INIT);
     session.addRemoteConfig("tsig_keys", updateKeyring, false);
 }
 
@@ -62,7 +62,7 @@ deinitKeyring(config::ModuleCCSession& session) {
         // Not initialized, ignore it
         return;
     }
-    LOG_DEBUG(logger, DBG_TRACE_BASIC, SRV_COMMON_KEYS_DEINIT);
+    LOG_DEBUG(logger, DBG_TRACE_BASIC, SRVCOMM_KEYS_DEINIT);
     keyring.reset();
     session.removeRemoteConfig("tsig_keys");
 }

+ 8 - 8
src/lib/server_common/portconfig.cc

@@ -42,7 +42,7 @@ parseAddresses(isc::data::ConstElementPtr addresses,
                 ConstElementPtr addr(addrPair->get("address"));
                 ConstElementPtr port(addrPair->get("port"));
                 if (!addr || ! port) {
-                    LOG_ERROR(logger, SRV_COMMON_ADDRESS_MISSING).
+                    LOG_ERROR(logger, SRVCOMM_ADDRESS_MISSING).
                         arg(addrPair->str());
                     isc_throw(BadValue, "Address must contain both the IP"
                         "address and port");
@@ -51,7 +51,7 @@ parseAddresses(isc::data::ConstElementPtr addresses,
                     IOAddress(addr->stringValue());
                     if (port->intValue() < 0 ||
                         port->intValue() > 0xffff) {
-                        LOG_ERROR(logger, SRV_COMMON_PORT_RANGE).
+                        LOG_ERROR(logger, SRVCOMM_PORT_RANGE).
                             arg(port->intValue()).arg(addrPair->str());
                         isc_throw(BadValue, "Bad port value (" <<
                             port->intValue() << ")");
@@ -60,14 +60,14 @@ parseAddresses(isc::data::ConstElementPtr addresses,
                         port->intValue()));
                 }
                 catch (const TypeError &e) { // Better error message
-                    LOG_ERROR(logger, SRV_COMMON_ADDRESS_TYPE).
+                    LOG_ERROR(logger, SRVCOMM_ADDRESS_TYPE).
                         arg(addrPair->str());
                     isc_throw(TypeError,
                         "Address must be a string and port an integer");
                 }
             }
         } else if (addresses->getType() != Element::null) {
-            LOG_ERROR(logger, SRV_COMMON_ADDRESSES_NOT_LIST);
+            LOG_ERROR(logger, SRVCOMM_ADDRESSES_NOT_LIST);
             isc_throw(TypeError, elemName + " config element must be a list");
         }
     }
@@ -92,9 +92,9 @@ installListenAddresses(const AddressList& newAddresses,
                        isc::asiodns::DNSService& service)
 {
     try {
-        LOG_DEBUG(logger, DBG_TRACE_BASIC, SRV_COMMON_SET_LISTEN);
+        LOG_DEBUG(logger, DBG_TRACE_BASIC, SRVCOMM_SET_LISTEN);
         BOOST_FOREACH(const AddressPair& addr, newAddresses) {
-            LOG_DEBUG(logger, DBG_TRACE_VALUES, SRV_COMMON_ADDRESS_VALUE).
+            LOG_DEBUG(logger, DBG_TRACE_VALUES, SRVCOMM_ADDRESS_VALUE).
                 arg(addr.first).arg(addr.second);
         }
         setAddresses(service, newAddresses);
@@ -114,12 +114,12 @@ installListenAddresses(const AddressList& newAddresses,
          * user will get error info, command control can be used to set new
          * address. So we just catch the exception without propagating outside
          */
-        LOG_ERROR(logger, SRV_COMMON_ADDRESS_FAIL).arg(e);
+        LOG_ERROR(logger, SRVCOMM_ADDRESS_FAIL).arg(e);
         try {
             setAddresses(service, addressStore);
         }
         catch (const exception& e2) {
-            LOG_FATAL(logger, SRV_COMMON_ADDRESS_UNRECOVERABLE).arg(e2);
+            LOG_FATAL(logger, SRVCOMM_ADDRESS_UNRECOVERABLE).arg(e2);
         }
         //Anyway the new configure has problem, we need to notify configure
         //manager the new configure doesn't work

+ 13 - 13
src/lib/server_common/server_common_messages.mes

@@ -16,27 +16,27 @@ $NAMESPACE isc::server_common
 
 # \brief Messages for the server_common library
 
-% SRV_COMMON_ADDRESSES_NOT_LIST the address and port specification is not a list
+% SRVCOMM_ADDRESSES_NOT_LIST the address and port specification is not a list
 This points to an error in configuration. What was supposed to be a list of
 IP address - port pairs isn't a list at all but something else.
 
-% SRV_COMMON_ADDRESS_FAIL failed to listen on addresses (%1)
+% SRVCOMM_ADDRESS_FAIL failed to listen on addresses (%1)
 The server failed to bind to one of the address/port pair it should according
 to configuration, for reason listed in the message (usually because that pair
 is already used by other service or missing privileges). The server will try
 to recover and bind the address/port pairs it was listening before.
 
-% SRV_COMMON_ADDRESS_MISSING address specification is missing "address" or "port" element in %1
+% SRVCOMM_ADDRESS_MISSING address specification is missing "address" or "port" element in %1
 This points to an error in configuration. Some address specification is missing
 either the address or port part and therefore can not be used.
 
-% SRV_COMMON_ADDRESS_TYPE address specification type is invalid in %1
+% SRVCOMM_ADDRESS_TYPE address specification type is invalid in %1
 This points to an error in configuration. Some address specification is
 malformed. The address part must be a string (and a valid IP address, either
 IPv4 or IPv6) and the port must be integer (in the valid range).
 
-% SRV_COMMON_ADDRESS_UNRECOVERABLE failed to recover original addresses also (%2)
-The recovery of old addresses after SRV_COMMON_ADDRESS_FAIL also failed (for
+% SRVCOMM_ADDRESS_UNRECOVERABLE failed to recover original addresses also (%2)
+The recovery of old addresses after SRVCOMM_ADDRESS_FAIL also failed (for
 the reason listed). This should not happen.
 
 We would really like to terminate the server right now, but considering that
@@ -46,30 +46,30 @@ It probably will not work, but will allow the reconfiguration. We hope to
 update the configuration system so we can really crash the server happily
 instead.
 
-% SRV_COMMON_ADDRESS_VALUE address to set: %1#%2
+% SRVCOMM_ADDRESS_VALUE address to set: %1#%2
 Debug message. This lists one address and port value of the set of
 addresses we are going to listen on (eg. there will be one log message
-per pair). This appears only after SRV_COMMON_SET_LISTEN, but might
+per pair). This appears only after SRVCOMM_SET_LISTEN, but might
 be hidden, as it has higher debug level.
 
-% SRV_COMMON_KEYS_DEINIT deinitilizing TSIG keyring
+% SRVCOMM_KEYS_DEINIT deinitilizing TSIG keyring
 Debug message indicating that the server is deinilizing the TSIG keyring. This
 could be seen at server shutdown only, but usually not even there, as leaving
 the TSIG in memory until the real shutdown and memory reclamation by OS is
 harmless, so we don't usually do it.
 
-% SRV_COMMON_KEYS_INIT initializing TSIG keyring
+% SRVCOMM_KEYS_INIT initializing TSIG keyring
 Debug message indicating new keyring is being loaded from configuration (either
 on startup or as a result of configuration update).
 
-% SRV_COMMON_KEYS_UPDATE updating TSIG keyring
+% SRVCOMM_KEYS_UPDATE updating TSIG keyring
 Debug message indicating that the server is initializing global TSIG keyring.
 This should be seen only at server start.
 
-% SRV_COMMON_PORT_RANGE port out of valid range (%1 in %2)
+% SRVCOMM_PORT_RANGE port out of valid range (%1 in %2)
 This points to an error in configuration. The port in some address
 specification is out of the valid range (0-65535).
 
-% SRV_COMMON_SET_LISTEN setting addresses to listen to
+% SRVCOMM_SET_LISTEN setting addresses to listen to
 Debug message, noting that the server is about to start listening on a
 different set of IP addresses and ports.