]> git.puffer.fish Git - matthieu/frr.git/commitdiff
2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
authorajs <ajs>
Fri, 3 Dec 2004 19:03:33 +0000 (19:03 +0000)
committerajs <ajs>
Fri, 3 Dec 2004 19:03:33 +0000 (19:03 +0000)
* HACKING: Indicate that header files should be consulted for
  documentation, particularly logging levels in lib/log.h.
* log.h: Document appropriate use of syslog logging priorities
  inside quagga.

ChangeLog
HACKING
lib/ChangeLog
lib/log.h

index 8754e7d20975d4ae64687eb16dac7424b4349070..69b0875668df33b1c0f975f501719c70663789c1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * HACKING: Indicate that header files should be consulted for
+         documentation, particularly logging levels in lib/log.h.
+
 2004-11-24 Paul Jakma <paul@dishone.st>
 
        * TODO: Add source routing, zebra filtering and lib/ documenting.
diff --git a/HACKING b/HACKING
index fa5ac1ace14212975016f0b9cdb753321a696bac..1335b082cb6952fc03cde1c4e3345bd2dc7fe298 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -1,5 +1,5 @@
 -*- mode: text; -*-
-$Id: HACKING,v 1.12 2004/11/15 19:23:47 gdt Exp $
+$Id: HACKING,v 1.13 2004/12/03 19:03:33 ajs Exp $
 
 GUIDELINES FOR HACKING ON QUAGGA
 
@@ -36,6 +36,15 @@ the top, commented out appropriately for the file type.  Just add
 <dollar>Id:<dollar>, replacing <dollar> with $.  See line 2 of HACKING
 for an example; on checkout :$ is expanded to include the value.
 
+Please document fully the proper use of a new function in the header file
+in which it is declared.  And please consult existing headers for
+documentation on how to use existing functions.  In particular, please consult
+these header files:
+
+  lib/log.h    logging levels and usage guidance
+  [more to be added]
+
+
 CHANGELOG
 
 Add a ChangeLog entry whenever changing code, except for minor fixes
index d334b04eee0b649e42051e2d7d33ac4f540ad6c0..79062cae4632b39aca55eed7dbe4aadb30970384 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+       * log.h: Document appropriate use of syslog logging priorities
+         inside quagga.
+
 2004-12-03 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
 
        * command.h: Remove fields log_stdout and log_syslog from struct host,
index e596cdd0b05068753b80af8cadfad22dd3eb96d4..26ff902bc7c3d5527c0a2d825fba20c94c01d3a6 100644 (file)
--- a/lib/log.h
+++ b/lib/log.h
 
 #include <syslog.h>
 
+/* Here is some guidance on logging levels to use:
+ *
+ * LOG_DEBUG   - For all messages that are enabled by optional debugging
+ *               features, typically preceded by "if (IS...DEBUG...)"
+ * LOG_INFO    - Information that may be of interest, but everything seems
+ *               to be working properly.
+ * LOG_NOTICE  - Only for message pertaining to daemon startup or shutdown.
+ * LOG_WARNING - Warning conditions: unexpected events, but the daemon believes
+ *               it can continue to operate correctly.
+ * LOG_ERR     - Error situations indicating malfunctions.  Probably require
+ *               attention.
+ *
+ * Note: LOG_CRIT, LOG_ALERT, and LOG_EMERG are currently not used anywhere,
+ * please use LOG_ERR instead.
+ */
+
 #define ZLOG_NOLOG              0x00
 #define ZLOG_FILE              0x01
 #define ZLOG_SYSLOG            0x02