Utils/Logger: Add console directory to target
[senf.git] / Utils / Logger / Target.ih
index c96eb32..c6d4efb 100644 (file)
@@ -30,6 +30,7 @@
 #include <memory>
 #include <boost/type_traits/is_same.hpp>
 #include <boost/static_assert.hpp>
+#include "../Console/LazyDirectory.hh"
 
 ///////////////////////////////ih.p////////////////////////////////////////
 
@@ -45,7 +46,7 @@ namespace detail {
         using senf::singleton<TargetRegistry>::instance;
 
         void write(StreamBase const & stream, AreaBase const & area, unsigned level, 
-                   std::string msg);
+                   std::string const & msg);
 
         void routed();
         bool fallbackRouting();
@@ -53,13 +54,15 @@ namespace detail {
     private:
         TargetRegistry();
         
-        void registerTarget(Target * target);
+        void registerTarget(Target * target, std::string const & name);
         void unregisterTarget(Target * target);
 
         typedef std::set<Target *> Targets;
         Targets targets_;
 
         bool fallbackRouting_;
+
+        console::LazyDirectory consoleDir_;
         
         friend class senf::log::Target;
         friend class senf::singleton<TargetRegistry>;
@@ -67,7 +70,7 @@ namespace detail {
 
     /** \brief Internal: Write log message */
     template <class Stream, class Area, class Level>
-    void write(std::string msg);
+    void write(std::string const & msg);
 
 #ifndef DOXYGEN