X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FTarget.hh;h=b4137d6db827249696c1a8c78460d8bcb4d74f80;hb=ac86c2bb40746fbedf70a19af3307e5da642b04a;hp=777e546d81b2373c7146eb36d9bd879f9aff1489;hpb=56ec4faa5dcae61746a78375cb7de605d0b79738;p=senf.git diff --git a/Utils/Logger/Target.hh b/Utils/Logger/Target.hh index 777e546..b4137d6 100644 --- a/Utils/Logger/Target.hh +++ b/Utils/Logger/Target.hh @@ -30,6 +30,7 @@ #include #include #include +#include #include "../singleton.hh" #include "../mpl.hh" #include "StreamRegistry.hh" @@ -99,17 +100,54 @@ namespace log { ///@} - template void route(action_t action = ACCEPT, int index = -1); - template void route(action_t action = ACCEPT, int index = -1); - template void route(action_t action = ACCEPT, - int index = -1); + template void route( + action_t action = ACCEPT, int index = -1); + template void route( + action_t action = ACCEPT, int index = -1, + typename boost::enable_if< boost::is_convertible >::type * = 0); + template void route( + action_t action = ACCEPT, int index = -1, + typename boost::enable_if< boost::is_convertible >::type * = 0); + template void route( + action_t action = ACCEPT, int index = -1, + typename boost::enable_if< boost::is_convertible >::type * = 0); + template void route( + action_t action = ACCEPT, int index = -1, + typename boost::enable_if< boost::is_convertible >::type * = 0); + template void route( + action_t action = ACCEPT, int index = -1, + typename boost::enable_if< boost::is_convertible >::type * = 0); void route(std::string const & stream, std::string const & area = "", unsigned level = NONE::value, action_t action = ACCEPT, int index = -1); - template void unroute(action_t action = ACCEPT); - template void unroute(action_t action = ACCEPT); - template void unroute(action_t action = ACCEPT); + template void unroute( + action_t action = ACCEPT); + template void unroute( + action_t action = ACCEPT, + typename boost::enable_if< boost::is_convertible >::type * = 0); + template void unroute( + action_t action = ACCEPT, + typename boost::enable_if< boost::is_convertible >::type * = 0); + template void unroute( + action_t action = ACCEPT, + typename boost::enable_if< boost::is_convertible >::type * = 0); + template void unroute( + action_t action = ACCEPT, + typename boost::enable_if< boost::is_convertible >::type * = 0); + template void unroute( + action_t action = ACCEPT, + typename boost::enable_if< boost::is_convertible >::type * = 0); void unroute(std::string const & stream, std::string const & area = "", unsigned level = NONE::value, action_t action = ACCEPT); @@ -132,16 +170,6 @@ namespace log { void unroute(detail::StreamBase const * stream, detail::AreaBase const * area, unsigned level, action_t action); - template void route(detail::StreamBase const * stream, - detail::AreaBase const *, action_t action, int index); - template void route(detail::StreamBase const * stream, - detail::LevelBase const *, action_t action, int index); - - template void unroute(detail::StreamBase const * stream, - detail::AreaBase const *, action_t action); - template void unroute(detail::StreamBase const * stream, - detail::LevelBase const *, action_t action); - void updateRoutingCache(detail::StreamBase const * stream, detail::AreaBase const * area); void write(boost::posix_time::ptime timestamp, detail::StreamBase const & stream,