Log channel Forwarding

Log channel forwarding is a new feature of ITL version 2. Now you can tell ITLogLib to forward all logmessages that are sent a given log channel to further log channels. This output of a logmessage in additional log channels happens without making duplicates of the logmessage in memory.


Each log channel has a list of forward (or additional) log channels. This list is empty by default. It is permanently stored in the logging configuration file (ICF) of your application, like other properties of the log channels.


As with the other properties of a log channel you can edit its forwarding log channels list with the Configuration Manager.


The list can be changed (with the associated effect) even while your logging application is running.



      New log channels:
Note that, as before, you cannot add
new log channels to your application without restarting it. Furthermore you must extend the start-up code of your application so that it opens these additional log channels to make them usable.

      Forwarding and filters:
Forwarding / copying works regardless of whether the logmessages pass the write-out filter of the primary log channel. Even when all output is suppressed for the primary log channel, the log channels of its forward log channels list get the logmessage and decide themselves about output.

Forwarding can be cascaded. A log channel A can forward to B, and B can forward to C, so that all logmessages that are sent to A also go to C.



Add one or more extra log channels to your application and use them to catch special logmessages:

      Adding is, as always, done by defining them with the Configuration Manager and opening them in your application startup code.

      Donít extend your code to send logmessages directly to them. Instead, forward the logmessages of other, already existing log channels to them.

      Use the filter mechanism of the new log channels to catch the logmessages you are looking for.
Both forwarding and filtering can be changed at runtime.