Browse Source

[trac1040] Expand logger implementation message code names

Altered the message code names in the logger implementation messages
to be in the form of words separated by underscores.  Also updated
some of the descriptions at the same time.
Stephen Morris 14 years ago
parent
commit
ebc9aa4dc5

+ 3 - 3
src/lib/log/logger_level_impl.cc

@@ -157,12 +157,12 @@ LoggerLevelImpl::logLevelFromString(const log4cplus::tstring& level) {
                 try {
                     int dbglevel = boost::lexical_cast<int>(name.substr(5));
                     if (dbglevel < MIN_DEBUG_LEVEL) {
-                        LOG_WARN(logger, LOGIMPL_BELOWDBGMIN).arg(dbglevel)
+                        LOG_WARN(logger, LOGIMPL_BELOW_MIN_DEBUG).arg(dbglevel)
                             .arg(MIN_DEBUG_LEVEL);
                         dbglevel = MIN_DEBUG_LEVEL;
 
                     } else if (dbglevel > MAX_DEBUG_LEVEL) {
-                        LOG_WARN(logger, LOGIMPL_ABOVEDBGMAX).arg(dbglevel)
+                        LOG_WARN(logger, LOGIMPL_ABOVE_MAX_DEBUG).arg(dbglevel)
                             .arg(MAX_DEBUG_LEVEL);
                         dbglevel = MAX_DEBUG_LEVEL;
 
@@ -170,7 +170,7 @@ LoggerLevelImpl::logLevelFromString(const log4cplus::tstring& level) {
                     return convertFromBindLevel(Level(DEBUG, dbglevel));
                 }
                 catch (boost::bad_lexical_cast&) {
-                    LOG_ERROR(logger, LOGIMPL_BADDEBUG).arg(name);
+                    LOG_ERROR(logger, LOGIMPL_BAD_DEBUG_STRING).arg(name);
                     return (NOT_SET_LOG_LEVEL);
                 }
             }

+ 7 - 7
src/lib/log/logimpl_messages.cc

@@ -1,4 +1,4 @@
-// File created from logimpl_messages.mes on Wed Jun 22 10:38:55 2011
+// File created from logimpl_messages.mes on Wed Jun 22 10:57:02 2011
 
 #include <cstddef>
 #include <log/message_types.h>
@@ -7,9 +7,9 @@
 namespace isc {
 namespace log {
 
-extern const isc::log::MessageID LOGIMPL_ABOVEDBGMAX = "LOGIMPL_ABOVEDBGMAX";
-extern const isc::log::MessageID LOGIMPL_BADDEBUG = "LOGIMPL_BADDEBUG";
-extern const isc::log::MessageID LOGIMPL_BELOWDBGMIN = "LOGIMPL_BELOWDBGMIN";
+extern const isc::log::MessageID LOGIMPL_ABOVE_MAX_DEBUG = "LOGIMPL_ABOVE_MAX_DEBUG";
+extern const isc::log::MessageID LOGIMPL_BAD_DEBUG_STRING = "LOGIMPL_BAD_DEBUG_STRING";
+extern const isc::log::MessageID LOGIMPL_BELOW_MIN_DEBUG = "LOGIMPL_BELOW_MIN_DEBUG";
 
 } // namespace log
 } // namespace isc
@@ -17,9 +17,9 @@ extern const isc::log::MessageID LOGIMPL_BELOWDBGMIN = "LOGIMPL_BELOWDBGMIN";
 namespace {
 
 const char* values[] = {
-    "LOGIMPL_ABOVEDBGMAX", "debug level of %1 is too high and will be set to the maximum of %2",
-    "LOGIMPL_BADDEBUG", "debug string is '%1': must be of the form DEBUGn",
-    "LOGIMPL_BELOWDBGMIN", "debug level of %1 is too low and will be set to the minimum of %2",
+    "LOGIMPL_ABOVE_MAX_DEBUG", "debug level of %1 is too high and will be set to the maximum of %2",
+    "LOGIMPL_BAD_DEBUG_STRING", "debug string '%1' has invalid format",
+    "LOGIMPL_BELOW_MIN_DEBUG", "debug level of %1 is too low and will be set to the minimum of %2",
     NULL
 };
 

+ 4 - 4
src/lib/log/logimpl_messages.h

@@ -1,4 +1,4 @@
-// File created from logimpl_messages.mes on Wed Jun 22 10:38:55 2011
+// File created from logimpl_messages.mes on Wed Jun 22 10:57:02 2011
 
 #ifndef __LOGIMPL_MESSAGES_H
 #define __LOGIMPL_MESSAGES_H
@@ -8,9 +8,9 @@
 namespace isc {
 namespace log {
 
-extern const isc::log::MessageID LOGIMPL_ABOVEDBGMAX;
-extern const isc::log::MessageID LOGIMPL_BADDEBUG;
-extern const isc::log::MessageID LOGIMPL_BELOWDBGMIN;
+extern const isc::log::MessageID LOGIMPL_ABOVE_MAX_DEBUG;
+extern const isc::log::MessageID LOGIMPL_BAD_DEBUG_STRING;
+extern const isc::log::MessageID LOGIMPL_BELOW_MIN_DEBUG;
 
 } // namespace log
 } // namespace isc

+ 18 - 12
src/lib/log/logimpl_messages.mes

@@ -21,17 +21,23 @@
 
 $NAMESPACE isc::log
 
-% LOGIMPL_ABOVEDBGMAX   debug level of %1 is too high and will be set to the maximum of %2
-A message from the underlying logger implementation code, the debug level
-(as set by the string DEBGUGn) is above the maximum allowed value and has
-been reduced to that value.
+% LOGIMPL_ABOVE_MAX_DEBUG debug level of %1 is too high and will be set to the maximum of %2
+A message from the interface to the underlying logger implementation reporting
+that the debug level (as set by an internally-created string DEBUGn, where n
+is an integer, e.g. DEBUG22) is above the maximum allowed value and has
+been reduced to that value.  The appearance of this message may indicate
+a programming error - please submit a bug report.
 
-% LOGIMPL_BADDEBUG      debug string is '%1': must be of the form DEBUGn
-The string indicating the extended logging level (used by the underlying
-logger implementation code) is not of the stated form.  In particular,
-it starts DEBUG but does not end with an integer.
+% LOGIMPL_BAD_DEBUG_STRING debug string '%1' has invalid format
+A message from the interface to the underlying logger implementation
+reporting that an internally-created string used to set the debug level
+is not of the correct format (it should be of the form DEBUGn, where n
+is an integer, e.g. DEBUG22).  The appearance of this message indicates
+a programming error - please submit a bug report.
 
-% LOGIMPL_BELOWDBGMIN   debug level of %1 is too low and will be set to the minimum of %2
-A message from the underlying logger implementation code, the debug level
-(as set by the string DEBGUGn) is below the minimum allowed value and has
-been increased to that value.
+% LOGIMPL_BELOW_MIN_DEBUG debug level of %1 is too low and will be set to the minimum of %2
+A message from the interface to the underlying logger implementation reporting
+that the debug level (as set by an internally-created string DEBUGn, where n
+is an integer, e.g. DEBUG22) is below the minimum allowed value and has
+been increased to that value.  The appearance of this message may indicate
+a programming error - please submit a bug report.