Browse Source

[trac1071] Changes after review

Stephen Morris 14 years ago
parent
commit
2586630143

+ 21 - 22
src/lib/log/README

@@ -142,19 +142,18 @@ Points to note:
     the error originated from the logging library and the "WRITE_ERROR"
     the error originated from the logging library and the "WRITE_ERROR"
     indicates that there was a problem in a write operation.
     indicates that there was a problem in a write operation.
 
 
-  * The rest of the line - from the first non-space character to the last non-
-    space character - is taken exactly as-is for the text of the message. There
-    are no restrictions on what characters may be in this text, other than they
-    be printable.  (This means that both single-quote (') and double-quote (")
-    characters are allowed.)
-
-  * The replacement tokens are the strings "%1", "%2" etc.  When a message
-    is logged, these are replaced with the arguments passed to the logging
-    call: %1 refers to the first argument, %2 to the second etc.  Within the
-    message text, the placeholders can appear in any order and placeholders
-    can be repeated.
-     
-* Remaining lines indicate an explanation for the preceding message.  These
+  * The rest of the line - from the first non-space character to the
+    last non- space character - is taken exactly as-is for the text
+    of the message. There are no restrictions on what characters may
+    be in this text, other than they be printable.  (This means that
+    both single-quote (') and double-quote (") characters are allowed.)
+    The message text may include replacement tokens (the strings "%1",
+    "%2" etc.).  When a message is logged, these are replaced with the
+    arguments passed to the logging call: %1 refers to the first argument,
+    %2 to the second etc.  Within the message text, the placeholders
+    can appear in any order and placeholders can be repeated.
+
+* Remaining lines indicate an explanation for the preceding message. These
   are intended to be processed by a separate program and used to generate
   are intended to be processed by a separate program and used to generate
   an error messages manual.  They are ignored by the message compiler.
   an error messages manual.  They are ignored by the message compiler.
 
 
@@ -238,7 +237,7 @@ Using the Logging - C++
 =======================
 =======================
 1. Build message header file and source file as describe above.
 1. Build message header file and source file as describe above.
 
 
-2. The main program unit should include a call to isc::log::initLogger()
+2. The main program unit must include a call to isc::log::initLogger()
    (described in more detail below) to set the logging severity, debug log
    (described in more detail below) to set the logging severity, debug log
    level, and external message file:
    level, and external message file:
 
 
@@ -285,7 +284,7 @@ Using the Logging - Python
 ==========================
 ==========================
 1. Build message module as describe above.
 1. Build message module as describe above.
 
 
-2. The main program unit should include a call to isc.log.init()
+2. The main program unit must include a call to isc.log.init()
    (described in more detail below) to set the to set the logging
    (described in more detail below) to set the to set the logging
    severity, debug log level, and external message file:
    severity, debug log level, and external message file:
 
 
@@ -326,7 +325,7 @@ Logging Initialization
 ======================
 ======================
 In all cases, if an attempt is made to use a logging method before the logging
 In all cases, if an attempt is made to use a logging method before the logging
 has been initialized, the program will terminate with a LoggingNotInitialized
 has been initialized, the program will terminate with a LoggingNotInitialized
-call.
+exception.
 
 
 C++
 C++
 ---
 ---
@@ -336,9 +335,9 @@ unit tests.
 
 
 Variant #1, Used by Production Programs
 Variant #1, Used by Production Programs
 ---------------------------------------
 ---------------------------------------
-    void initLogger(const std::string& root,
-                    isc::log::Severity severity = isc::log::INFO,
-                    int dbglevel = 0, const char* file = NULL);
+void isc::log::initLogger(const std::string& root,
+                          isc::log::Severity severity = isc::log::INFO,
+                          int dbglevel = 0, const char* file = NULL);
 
 
 This is the call that should be used by production programs:
 This is the call that should be used by production programs:
 
 
@@ -356,18 +355,18 @@ dbglevel
 The debug level used if "severity" is set to isc::log::DEBUG.
 The debug level used if "severity" is set to isc::log::DEBUG.
 
 
 file
 file
-The name of a local message file.  This will be read and its defintitions used
+The name of a local message file.  This will be read and its definitions used
 to replace the compiled-in text of the messages.
 to replace the compiled-in text of the messages.
 
 
 
 
 Variant #2, Used by Unit Tests
 Variant #2, Used by Unit Tests
 ------------------------------
 ------------------------------
-    void initLogger()
+    void isc::log::initLogger()
 
 
 This is the call that should be used by unit tests.  In this variant, all the
 This is the call that should be used by unit tests.  In this variant, all the
 options are supplied by environment variables. (It should not be used for
 options are supplied by environment variables. (It should not be used for
 production programs to avoid the chance that the program operation is affected
 production programs to avoid the chance that the program operation is affected
-by inadvertantly-defined environment variables.)
+by inadvertently-defined environment variables.)
 
 
 The environment variables are:
 The environment variables are:
 
 

+ 0 - 2
src/lib/log/tests/console_test.sh.in

@@ -13,8 +13,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 # PERFORMANCE OF THIS SOFTWARE.
 
 
-# \brief
-#
 # The logger supports the idea of a "console" logger than logs to either stdout
 # The logger supports the idea of a "console" logger than logs to either stdout
 # or stderr.  This test checks that both these options work.
 # or stderr.  This test checks that both these options work.
 
 

+ 1 - 4
src/lib/log/tests/destination_test.sh.in

@@ -13,10 +13,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 # PERFORMANCE OF THIS SOFTWARE.
 
 
-# \brief Severity test
-#
-# Checks that the logger will limit the output of messages less severy than
-# the severity/debug setting.
+# Checks that the logger will route messages to the chosen destination.
 
 
 testname="Destination test"
 testname="Destination test"
 echo $testname
 echo $testname

+ 2 - 4
src/lib/log/tests/init_logger_test.sh.in

@@ -13,10 +13,8 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 # PERFORMANCE OF THIS SOFTWARE.
 
 
-# \brief Severity test
-#
-# Checks that the logger will limit the output of messages less severy than
-# the severity/debug setting.
+# Checks that the initLogger() call uses for unit tests respects the setting of
+# the environment variables.
 
 
 testname="initLogger test"
 testname="initLogger test"
 echo $testname
 echo $testname

+ 0 - 2
src/lib/log/tests/local_file_test.sh.in

@@ -13,8 +13,6 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 # PERFORMANCE OF THIS SOFTWARE.
 
 
-# \brief Local message file test
-#
 # Checks that a local message file can override the definitions in the message
 # Checks that a local message file can override the definitions in the message
 # dictionary.
 # dictionary.
 
 

+ 1 - 3
src/lib/log/tests/severity_test.sh.in

@@ -13,9 +13,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 # PERFORMANCE OF THIS SOFTWARE.
 
 
-# \brief Severity test
-#
-# Checks that the logger will limit the output of messages less severy than
+# Checks that the logger will limit the output of messages less severe than
 # the severity/debug setting.
 # the severity/debug setting.
 
 
 testname="Severity test"
 testname="Severity test"