]> mj.ucw.cz Git - libucw.git/commitdiff
Logging: The list of level names is consistent again.
authorMartin Mares <mj@ucw.cz>
Thu, 19 Feb 2009 17:52:28 +0000 (18:52 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 19 Feb 2009 17:52:28 +0000 (18:52 +0100)
I have moved the list to <ucw/lib.h>. It is needed only rarely, but at this
place we hopefully won't miss again it when changing the levels.

ucw/lib.h
ucw/log.h

index b15b6d0cfe395391ee7254fe0684971c0bf790c7..0190c5a377c4cd2d02ed42c5f66874d65a0a1d1e 100644 (file)
--- a/ucw/lib.h
+++ b/ucw/lib.h
@@ -105,6 +105,9 @@ enum log_levels {                   /** The available log levels to pass to msg() and friends. *
 
 #define LOG_LEVEL_NAMES P(DEBUG) P(INFO) P(WARN) P(ERROR) P(INFO_R) P(WARN_R) P(ERROR_R) P(FATAL)
 
+// Return the letter associated with a given severity level
+#define LS_LEVEL_LETTER(level) ("DIWEiwe!###"[( level )])
+
 #define L_SIGHANDLER   0x80000000      /** Avoid operations that are unsafe in signal handlers **/
 #define L_LOGGER_ERR   0x40000000      /** Used internally to avoid infinite reporting of logging errors **/
 
index 0e4ea30d77e0102b652ba5ee282cdf84f06b00c3..3c7264a6deaa1880faf053d5bc0f4a30bb9cfa9f 100644 (file)
--- a/ucw/log.h
+++ b/ucw/log.h
@@ -67,9 +67,6 @@ enum ls_flag {
   LSFLAG_ERR_REPORTED =        2,              // A logging error has been already reported on this stream
 };
 
-// Return the letter associated with a given severity level
-#define LS_LEVEL_LETTER(level) ("DIiWwEe!###"[( level )])
-
 /***
  * === Message flags
  *