BIND 10 trac1024, updated. 4d17de950b96631d01c7928b9cab24860b2e29e5 [trac1024] Update documentation

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Jul 14 08:56:53 UTC 2011


The branch, trac1024 has been updated
       via  4d17de950b96631d01c7928b9cab24860b2e29e5 (commit)
      from  a7047de1ec7aece83271cc28605ea1d790afee67 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4d17de950b96631d01c7928b9cab24860b2e29e5
Author: Stephen Morris <stephen at isc.org>
Date:   Thu Jul 14 09:56:33 2011 +0100

    [trac1024] Update documentation

-----------------------------------------------------------------------

Summary of changes:
 src/lib/log/logger_support.h          |   19 ++++++++-----------
 src/lib/log/logger_unittest_support.h |   13 +++++++++----
 src/lib/python/isc/log/log.cc         |    9 +++++----
 3 files changed, 22 insertions(+), 19 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/log/logger_support.h b/src/lib/log/logger_support.h
index 1c5f8e6..4ce3ced 100644
--- a/src/lib/log/logger_support.h
+++ b/src/lib/log/logger_support.h
@@ -19,10 +19,14 @@
 
 #include <string>
 #include <log/logger.h>
-
-// Include the unit test function declarations here for compatibility
 #include <log/logger_unittest_support.h>
 
+/// \file
+/// \brief Logging initialization functions
+///
+/// Contains a set of functions relating to logging initialization that are
+/// used by the production code.
+
 namespace isc {
 namespace log {
 
@@ -36,17 +40,13 @@ namespace log {
 /// \return true if logging has been initialized, false if not
 bool isLoggingInitialized();
 
-/// \brief Set "logging initialized" flag
-///
-/// Sets the state of the "logging initialized" flag.
+/// \brief Set state of "logging initialized" flag
 ///
 /// \param state State to set the flag to. (This is expected to be "true" - the
 ///        default - for all code apart from specific unit tests.)
 void setLoggingInitialized(bool state = true);
 
-
-
-/// \brief Run-Time Initialization
+/// \brief Run-time initialization
 ///
 /// Performs run-time initialization of the logger in particular supplying:
 ///
@@ -65,10 +65,7 @@ void initLogger(const std::string& root,
                 isc::log::Severity severity = isc::log::INFO,
                 int dbglevel = 0, const char* file = NULL);
 
-
-
 } // namespace log
 } // namespace isc
 
-
 #endif // __LOGGER_SUPPORT_H
diff --git a/src/lib/log/logger_unittest_support.h b/src/lib/log/logger_unittest_support.h
index e98544e..ce9121b 100644
--- a/src/lib/log/logger_unittest_support.h
+++ b/src/lib/log/logger_unittest_support.h
@@ -18,7 +18,12 @@
 #include <string>
 #include <log/logger.h>
 
-// Note: this file holds logging functions used by unit tests.
+/// \file
+/// \brief Miscellaneous logging functions used by the unit tests.
+///
+/// As the configuration database is unsually unavailable during unit tests,
+/// the functions defined here allow a limited amount of logging configuration
+/// through the use of environment variables
 
 namespace isc {
 namespace log {
@@ -71,7 +76,7 @@ void initLogger(isc::log::Severity severity = isc::log::DEBUG,
                 int dbglevel = isc::log::MAX_DEBUG_LEVEL);
 
 
-/// \brief Logging Severity from B10_LOGGER_SEVERITY
+/// \brief Obtains logging severity from B10_LOGGER_SEVERITY
 ///
 /// Support function called by the unit test logging initialization code.
 /// It returns the logging severity defined by B10_LOGGER_SEVERITY.  If
@@ -84,7 +89,7 @@ void initLogger(isc::log::Severity severity = isc::log::DEBUG,
 isc::log::Severity b10LoggerSeverity(isc::log::Severity defseverity);
 
 
-/// \brief Logging Debug Level from B10_LOGGER_DBGLEVEL
+/// \brief Obtains logging debug level from B10_LOGGER_DBGLEVEL
 ///
 /// Support function called by the unit test logging initialization code.
 /// It returns the logging debug level defined by B10_LOGGER_DBGLEVEL.  If
@@ -103,7 +108,7 @@ isc::log::Severity b10LoggerSeverity(isc::log::Severity defseverity);
 int b10LoggerDbglevel(int defdbglevel);
 
 
-/// \brief Reset Root Logger Characteristics
+/// \brief Reset root logger characteristics
 ///
 /// This is a simplified interface into the resetting of the characteristics
 /// of the root logger.  It is aimed for use in unit tests and resets the
diff --git a/src/lib/python/isc/log/log.cc b/src/lib/python/isc/log/log.cc
index ace1f71..aa12664 100644
--- a/src/lib/python/isc/log/log.cc
+++ b/src/lib/python/isc/log/log.cc
@@ -269,10 +269,11 @@ PyMethodDef methods[] = {
         "'FATAL'), a debug level (integer in the range 0-99) and a file name "
         "of a dictionary with message text translations."},
     {"resetUnitTestRootLogger", resetUnitTestRootLogger, METH_VARARGS,
-        "Initialization for unit tests.  Sets the severity and output stream "
-        "according to a set of environment variables.  This should not be "
-        "used in production code.  The name is slightly confusing, but it "
-        "mirrors a method of the same name used for the C++ unit tests."},
+        "Resets the configuration of the root logger to that set by the "
+        "B10_XXX environment variables.  It is aimed at unit tests, where "
+        "the logging is initialized by the code under test; called before "
+        "the unit test starts, this function resets the logging configuration "
+        "to that in use for the C++ unit tests."},
     {"log_config_update", logConfigUpdate, METH_VARARGS,
         "Update logger settings. This method is automatically used when "
         "ModuleCCSession is initialized with handle_logging_config set "




More information about the bind10-changes mailing list