Utils/Logger: Add console directory to target
[senf.git] / Utils / Logger / Target.ih
index 9ef0e0e..c6d4efb 100644 (file)
 /** \file
     \brief Target internal header */
 
-#ifndef IH_Target_
-#define IH_Target_ 1
+#ifndef IH_SENF_Utils_Logger_Target_
+#define IH_SENF_Utils_Logger_Target_ 1
 
 // Custom includes
 #include <memory>
-#include <boost/scoped_ptr.hpp>
 #include <boost/type_traits/is_same.hpp>
 #include <boost/static_assert.hpp>
+#include "../Console/LazyDirectory.hh"
 
 ///////////////////////////////ih.p////////////////////////////////////////
 
@@ -46,9 +46,7 @@ namespace detail {
         using senf::singleton<TargetRegistry>::instance;
 
         void write(StreamBase const & stream, AreaBase const & area, unsigned level, 
-                   std::string msg);
-
-        void timeSource(std::auto_ptr<TimeSource> source);
+                   std::string const & msg);
 
         void routed();
         bool fallbackRouting();
@@ -56,14 +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_;
-        boost::scoped_ptr<TimeSource> timeSource_;
 
         bool fallbackRouting_;
+
+        console::LazyDirectory consoleDir_;
         
         friend class senf::log::Target;
         friend class senf::singleton<TargetRegistry>;
@@ -71,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