Packets: Fix VariantParser invalid parser access bug
[senf.git] / Utils / Logger / Definitions.hh
index 0429267..314937b 100644 (file)
@@ -1,8 +1,8 @@
 // $Id$
 //
-// Copyright (C) 2007 
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer NETwork research (NET)
+// Copyright (C) 2007
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
 //     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
@@ -23,8 +23,8 @@
 /** \file
     \brief Definitions public header */
 
-#ifndef HH_Definitions_
-#define HH_Definitions_ 1
+#ifndef HH_SENF_Utils_Logger_Definitions_
+#define HH_SENF_Utils_Logger_Definitions_ 1
 
 // Custom includes
 
@@ -50,9 +50,13 @@ namespace log {
         output.  \a compileLimit defines the default log level limit at compile time: Messages
         posted with a level below \a compileLimit will be discarded at compile time.
 
+        Normally the \a compileLimit will be \c NOTICE. This will enable all messages
+        <em>except</em> \c VERBOSE messages. These must then be enabled explicitly using the compile
+        time \ref config macro.
+
         \hideinitializer
      */
-#   define SENF_LOG_DEF_STREAM(stream, defaultLevel_, runtimeLimit_, compileLimit_)               \
+#   define SENF_LOG_DEFINE_STREAM(stream, defaultLevel_, runtimeLimit_, compileLimit_)            \
         struct stream                                                                             \
             : public senf::log::detail::StreamBase, public senf::singleton<stream>                \
         {                                                                                         \
@@ -73,17 +77,18 @@ namespace log {
 
         \hideinitializer
      */
-#   define SENF_LOG_DEF_AREA(area) SENF_LOG_DEF_AREA_I(area, ; )
+#   define SENF_LOG_DEFINE_AREA(area) SENF_LOG_DEFINE_AREA_I(area, ; )
 
     /** \brief Define new default log area for the class
 
         This command declares the containing class to be it's own default log area. It is such like
-        a combination of \ref SENF_LOG_DEF_AREA and \ref SENF_LOG_DEFAULT_AREA with a twist.
+        a combination of \ref SENF_LOG_DEFINE_AREA and \ref SENF_LOG_DEFAULT_AREA with a twist.
 
         \hideinitializer
      */
+    // See Definitions.ih for implementation details on SENF_LOG_CLASS_AREA
 #   define SENF_LOG_CLASS_AREA()                                                                  \
-        SENF_LOG_DEF_AREA_I(                                                                      \
+        SENF_LOG_DEFINE_AREA_I(                                                                   \
             SENFLogArea,                                                                          \
             std::string v_name() const                                                            \
                 { std::string s (fullName()); return std::string(s,0,s.size()-13); });            \
@@ -97,7 +102,7 @@ namespace log {
 
         \hideinitializer
      */
-#   define SENF_LOG_DEF_ALIAS(alias,args)                                                         \
+#   define SENF_LOG_DEFINE_ALIAS(alias,args)                                                      \
         struct alias : public senf::log::detail::AliasBase                                        \
         {                                                                                         \
             template <class Base>                                                                 \
@@ -107,12 +112,11 @@ namespace log {
             };                                                                                    \
         }
 
-        /** \brief Default global log stream */
-        SENF_LOG_DEF_STREAM(Debug, MESSAGE, MESSAGE, MESSAGE);
+    /** \brief Default global log stream */
+    SENF_LOG_DEFINE_STREAM(Debug, MESSAGE, MESSAGE, NOTICE);
 
-        /** \brief Default global log area */
-        SENF_LOG_DEF_AREA_I(DefaultArea,
-                            std::string v_name() const { return ""; });
+    /** \brief Default global %log area */
+    SENF_LOG_DEFINE_AREA(DefaultArea);
 
     ///\}
     ///\}