X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FTarget.ih;h=c6d4efb7fa11030081418748d1707fd47ed97fd4;hb=41eff772147b6df1961d9029ba6815b553b4f81d;hp=d80902ea41c8ad8c59100f3e8c1bd86399930c09;hpb=f32fbba56a55712998d251e914eb6e9ad95890e3;p=senf.git diff --git a/Utils/Logger/Target.ih b/Utils/Logger/Target.ih index d80902e..c6d4efb 100644 --- a/Utils/Logger/Target.ih +++ b/Utils/Logger/Target.ih @@ -23,14 +23,14 @@ /** \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 -#include #include #include +#include "../Console/LazyDirectory.hh" ///////////////////////////////ih.p//////////////////////////////////////// @@ -46,9 +46,7 @@ namespace detail { using senf::singleton::instance; void write(StreamBase const & stream, AreaBase const & area, unsigned level, - std::string msg); - - void timeSource(std::auto_ptr 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 Targets; Targets targets_; - boost::scoped_ptr timeSource_; bool fallbackRouting_; + + console::LazyDirectory consoleDir_; friend class senf::log::Target; friend class senf::singleton; @@ -71,7 +70,7 @@ namespace detail { /** \brief Internal: Write log message */ template - void write(std::string msg); + void write(std::string const & msg); #ifndef DOXYGEN @@ -87,7 +86,7 @@ namespace detail { // For g++ 4.0 (at least) we need to provide the fully scoped name for this default value. // no idea why. It works without the scope in 4.1 template < class T, class A2, class A1, - unsigned type = SENF_MPL_RV( senf::Log::detail::RouteParameterCheck_(static_cast(0)) ) > + unsigned type = SENF_MPL_RV( senf::log::detail::RouteParameterCheck_(static_cast(0)) ) > struct RouteParameters {}; @@ -113,7 +112,7 @@ namespace detail { : public RouteParameters { typedef RouteParameters base; - BOOST_STATIC_ASSERT( boost::is_same::value ); + BOOST_STATIC_ASSERT(( boost::is_same::value )); typedef T Stream; }; @@ -122,7 +121,7 @@ namespace detail { : public RouteParameters { typedef RouteParameters base; - BOOST_STATIC_ASSERT( boost::is_same::value ); + BOOST_STATIC_ASSERT(( boost::is_same::value )); typedef T Area; }; @@ -131,7 +130,7 @@ namespace detail { : public RouteParameters { typedef RouteParameters base; - BOOST_STATIC_ASSERT( boost::is_same::value ); + BOOST_STATIC_ASSERT(( boost::is_same::value )); typedef typename T::SENFLogArea Area; }; @@ -140,7 +139,7 @@ namespace detail { : public RouteParameters { typedef RouteParameters base; - BOOST_STATIC_ASSERT( boost::is_same::value ); + BOOST_STATIC_ASSERT(( boost::is_same::value )); typedef T Level; };