X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FTarget.hh;h=6f26ddd7a4fda22b5f7a7e990a82fdce79d73e32;hb=2c11dd8e777c365c863af6b34a7db54bdd06b7f6;hp=9065ef4c4075a511344665c906ab4478700702f4;hpb=5bf459d443ab7cef04116bc0cb95e1af0178334f;p=senf.git diff --git a/Utils/Logger/Target.hh b/Utils/Logger/Target.hh index 9065ef4..6f26ddd 100644 --- a/Utils/Logger/Target.hh +++ b/Utils/Logger/Target.hh @@ -36,6 +36,7 @@ #include "StreamRegistry.hh" #include "../Exception.hh" #include "TimeSource.hh" +#include "../Console/LazyDirectory.hh" //#include "Target.mpp" ///////////////////////////////hh.p//////////////////////////////////////// @@ -55,6 +56,7 @@ namespace log { namespace detail { class TargetRegistry; } namespace detail { class AreaBase; } + namespace detail { struct LogParameters; } /** \brief Logging target base class @@ -185,7 +187,7 @@ namespace log { ///\name Structors and default members ///@{ - Target(); + explicit Target(std::string const & name); virtual ~Target(); ///@} @@ -340,6 +342,8 @@ namespace log { void flush(); ///< Clear routing table + senf::console::ScopedDirectory<> & consoleDir(); ///< Get console/config directory + private: void route(detail::StreamBase const * stream, detail::AreaBase const * area, unsigned level, action_t action, int index); @@ -351,6 +355,10 @@ 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); + void consoleRoute(int index, detail::LogParameters const & pm, action_t action); + void consoleUnroute(detail::LogParameters const & pm, action_t action); + # ifdef DOXYGEN protected: # endif @@ -382,6 +390,8 @@ namespace log { RIB rib_; + console::LazyDirectory consoleDir_; + friend class detail::AreaBase; friend class detail::TargetRegistry; };