Utils/Logger: Add console directory to target
[senf.git] / Utils / Logger / Target.hh
index 502bae8..69fd1d1 100644 (file)
@@ -36,6 +36,7 @@
 #include "StreamRegistry.hh"
 #include "../Exception.hh"
 #include "TimeSource.hh"
+#include "../Console/LazyDirectory.hh"
 
 //#include "Target.mpp"
 ///////////////////////////////hh.p////////////////////////////////////////
@@ -160,7 +161,7 @@ namespace log {
 #           endif
 
             RoutingEntry();
-            bool operator==(RoutingEntry const & other);
+            bool operator==(RoutingEntry const & other) const;
 
         private:
             RoutingEntry(detail::StreamBase const * stream, detail::AreaBase const * area,
@@ -185,7 +186,7 @@ namespace log {
         ///\name Structors and default members
         ///@{
 
-        Target();
+        explicit Target(std::string const & name);
         virtual ~Target();
 
         ///@}
@@ -338,7 +339,7 @@ namespace log {
         size_type size() const;         ///< Number of routing table entries
         bool empty() const;             ///< \c true, if routing table empty, \c false otherwise
 
-        void clear();                   ///< Clear routing table
+        void flush();                   ///< Clear routing table
 
     private:
         void route(detail::StreamBase const * stream, detail::AreaBase const * area,
@@ -351,6 +352,8 @@ namespace log {
         void write(time_type timestamp, detail::StreamBase const & stream,
                    detail::AreaBase const & area, unsigned level, std::string const & message);
 
+        void consoleList(std::ostream & os);
+
 #   ifdef DOXYGEN
     protected:
 #   endif
@@ -382,6 +385,8 @@ namespace log {
 
         RIB rib_;
 
+        console::LazyDirectory consoleDir_;
+
         friend class detail::AreaBase;
         friend class detail::TargetRegistry;
     };