Fix dircopy for SCons V0.96.1
[senf.git] / Utils / Logger.hh
index 492dc0a..c766392 100644 (file)
@@ -1,3 +1,5 @@
+// $Id$
+//
 // Copyright (C) 2007
 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
@@ -41,7 +43,7 @@
     \endcode
 
     The last sequence element always is the log message. Before that we have a number of log
-    parameters <it>in arbitrary order</it>. Since giving all the parameters in every log message is
+    parameters <i>in arbitrary order</i>. Since giving all the parameters in every log message is
     to verbose, there are two helpful constructs to reduce the verbosity. Using \ref SENF_LOG_DEFAULTS it
     is possible to define the default logging parameters to be used within a given scope. Using
     \ref SENF_LOG_DEF_ALIAS you can define an alias (which is a scoped symbol) as an arbitrary
 ///////////////////////////////hh.p////////////////////////////////////////
 
 namespace senf {
+namespace log {
 
 #   ifndef _senf_LOG_STREAM
 #     define _senf_LOG_STREAM std::cerr
@@ -131,9 +134,9 @@ namespace senf {
 
         This macro will write it's last argument to the log stream. The last argument must be an
         expression which will be placed after a streaming \c operator<< (like
-        <it>some-log-sttream</it> \c << <it>last-macro-arg</it>).
+        <i>some-log-sttream</i> \c << <i>last-macro-arg</i>).
         \code
-        BOOST_LOG((parameters...)("log message " << args << ...));
+        SENF_LOG((parameters...)("log message " << args << ...));
         \endcode
 
         \hideinitializer
@@ -147,7 +150,7 @@ namespace senf {
         This macro is like SENF_LOG, however instead of writing a simple message, this macro allows
         to specify a complete block of code to be executed if the log message is enabled.
         \code
-        BOOST_LOG_BLOCK((parameters...)({
+        SENF_LOG_BLOCK((parameters...)({
            // arbitrary code using 'log' for logging
            log << "log message";
         }));
@@ -166,7 +169,7 @@ namespace senf {
 
         Sets the default log parameters for the current scope
         \code
-        BOOST_LOG_DEFAULTS((parameters...));
+        SENF_LOG_DEFAULTS((parameters...));
         \endcode
 
         \hideinitializer
@@ -179,7 +182,7 @@ namespace senf {
 
         \hideinitializer
      */
-#   define SENF_LOG_DEF_AREA(area)
+#   define SENF_LOG_DEF_AREA(area) struct area {}
 
     /** \brief Define log stream
 
@@ -188,7 +191,7 @@ namespace senf {
 
         \hideinitializer
      */
-#   define SENF_LOG_DEF_STREAM(stream)
+#   define SENF_LOG_DEF_STREAM(stream) struct stream {}
 
     /** \brief Define log parameter alias
 
@@ -197,11 +200,16 @@ namespace senf {
 
         \hideinitializer
      */
-#   define SENF_LOG_DEF_ALIAS(alias,args)
+#   define SENF_LOG_DEF_ALIAS(alias,args) struct alias {}
 
     /// @}
 
-}
+    enum Level { VERBOSE, NOTICE, MESSAGE, IMPORTANT, CRITICAL };
+    
+    SENF_LOG_DEF_STREAM(Debug);
+    SENF_LOG_DEF_AREA(DefaultArea);
+
+}}
 
 ///////////////////////////////hh.e////////////////////////////////////////
 //#include "Logger.cci"
@@ -216,4 +224,6 @@ namespace senf {
 // c-file-style: "senf"
 // indent-tabs-mode: nil
 // ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
 // End: