X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FTarget.hh;h=dbbad15cbeb1c0ac7370c94b48bc0182e33e6b6f;hb=c5d0e492a701a054b1f3d56e128b2c4675b0d50b;hp=f08ceb1f263f663200dbb4918494e8432e49c036;hpb=f5eba06e0b792b9e70555def60b0b98b8139381c;p=senf.git diff --git a/Utils/Logger/Target.hh b/Utils/Logger/Target.hh index f08ceb1..dbbad15 100644 --- a/Utils/Logger/Target.hh +++ b/Utils/Logger/Target.hh @@ -84,7 +84,7 @@ namespace log { Each parameter (stream, area and level) has two representations: A static (compile time constant) representation, which is the representation also used in the %log statements, and a - dynamic representation, which may be used for manipulating the routing table. + dynamic (runtime) representation. The static representation is used, when passing routing parameters via template arguments: \code @@ -114,6 +114,21 @@ namespace log { loglevels. Dynamically, it is represented by an unsigned integer number, the \c value member of that class. + \subsection target_routing_processing Ordering routing entries and route processing + + The routing table is processed from first route to last route, the first matching entry + determines the fate of a log messages. Therefore, the ordering of routing entries is + important. + + If no position is explicitly specified, new routing entries are added to the end of the + routing table. All routing statements however take an index as optional argument to + explicitly specify the position of the new routing entry. + + The index value starts from 0 for the first route. The value gives the position the new + routing entry will have after it has been added. An index of 0 will thus insert the new + routing entry at the beginning of the table. Negative values count from the back, -1 being + the last entry. + \section target_impl Implementing new targets To implement a new target type, you need to derive from senf::log::Target and implement the