X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FTarget.hh;h=664f5b23793e66e863394e25cf82f13c7440b8bf;hb=1b1d76302a5d61e918ef71f1c8e11f80ac1262e2;hp=7c999b8ce64122c416a5ef099baa9cb3ddf05293;hpb=ca70e274a556bf217f3f4c7b12e0fad2a7cd4853;p=senf.git diff --git a/Utils/Logger/Target.hh b/Utils/Logger/Target.hh index 7c999b8..664f5b2 100644 --- a/Utils/Logger/Target.hh +++ b/Utils/Logger/Target.hh @@ -71,7 +71,7 @@ namespace log { implementation is more efficient and utilizes a routing cache). Each routing entry consists of the following parameters - \li (mandatory) \e stream. The entry will match only messages directed at that stream + \li (optional) \e stream. The entry will match only messages directed at that stream \li (optional) \e area. If the area is specified, only messages directed at that area are matched, otherwise any area will be allowed \li (optional) \e level. If the log level is specified, messages will be accepted if their @@ -193,10 +193,11 @@ namespace log { template void route( action_t action = ACCEPT, int index = -1); ///< Add route (static) /**< Add a route for the given combination of \a Stream, \a - Area and \a Level. The \a Stream parameter is mandatory - while either \a Area or \a Level are optional (the - template signature is shown simplified here): + Area and \a Level. All parameters (\a Stream, \a Area + and \a Level) are optional (the template signature is + shown simplified here). Examples: \code + target.route(); target.route(); target.route(); target.route(); @@ -206,9 +207,9 @@ namespace log { See the class description for information on the \a action and \a index parameters - \tparam Stream mandatory stream to match - \tparam Area optional area to match - \tparam Level optional level, matches messages with + \tparam Stream stream to match + \tparam Area area to match + \tparam Level level, matches messages with at least the given level. \param[in] action routing action to take \param[in] index position of new route in the routing @@ -220,9 +221,9 @@ namespace log { unsigned level = NONE::value, action_t action = ACCEPT, int index = -1); ///< Add route (dynamic) /**< Add a route for the given combination of \a stream, \a - area and \a level. The \a stream parameter is mandatory - while either \a area or \a level may be left - unspecified by setting them to the empty string or + area and \a level. All parameters (\a Stream, \a Area + and \a Level) are optional and may be omitted by + setting them to the empty string or the senf::log::NONE::value respectively. See the class description for information on the \a @@ -233,10 +234,10 @@ namespace log { \throws InvalidAreaException if the given \a area is not found in the AreaRegistry - \param[in] stream mandatory stream to match - \param[in] area optional area to match - \param[in] level optional level, matches messages with - at least the given level. + \param[in] stream stream to match + \param[in] area area to match + \param[in] level level, matches messages with at least + the given level. \param[in] action routing action to take \param[in] index position of new route in the routing table */ @@ -255,9 +256,9 @@ namespace log { found, it will be removed, otherwise the call will be ignored - \tparam Stream mandatory stream to match - \tparam Area optional area to match - \tparam Level optional level, matches messages with + \tparam Stream stream to match + \tparam Area area to match + \tparam Level level, matches messages with at least the given level. \param[in] action routing action to take */ @@ -276,10 +277,10 @@ namespace log { found, it will be removed, otherwise the call will be ignored - \param[in] stream mandatory stream to match - \param[in] area optional area to match - \param[in] level optional level, matches messages with - at least the given level. + \param[in] stream stream to match + \param[in] area area to match + \param[in] level level, matches messages with at least + the given level. \param[in] action routing action to take */ void unroute(int index=-1); ///< Remove route (indexed) /**< This call will remove the route with the given index. @@ -291,51 +292,19 @@ namespace log { # ifndef DOXYGEN - 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); - - 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); + 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 unroute(action_t action = ACCEPT); + template + void unroute(action_t action = ACCEPT); + template + void unroute(action_t action = ACCEPT); # endif