Logger: added SENF_LOG_DEFINE_NAMED_AREA macro
tho [Thu, 4 Aug 2011 12:06:16 +0000 (12:06 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1806 270642c3-0616-0410-b53a-bc976706d245

senf/Utils/Logger/Definitions.hh

index e77486f..64c0812 100644 (file)
@@ -84,6 +84,10 @@ namespace log {
      */
 #   define SENF_LOG_DEFINE_AREA(area) SENF_LOG_DEFINE_AREA_I(area, ; )
 
+#   define SENF_LOG_DEFINE_NAMED_AREA(area, name)                                                 \
+        SENF_LOG_DEFINE_AREA_I(area,                                                              \
+            std::string v_name() const { return name; } );
+
     /** \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