Skip to content

Dispatcher reference

Pavel Korotkov edited this page Nov 26, 2013 · 12 revisions

Splitter dispatcher

Function: Sends received messages to all children nodes

Element name: Splitter

Allowed attributes:

  • formatid - format that will be inherited by all children nodes that doesn't override it

Example:

<seelog>
    <outputs>
        <splitter formatid="format1">
            <file path="log.log"/>
            <file path="log2.log"/>
        </splitter>
        <splitter formatid="format2">
            <file path="log3.log"/>
            <file path="log4.log"/>
        </splitter>
    </outputs>
    <formats>
        ...
    </formats>
</seelog>

Notes: "outputs" element is also a splitter, this is just a special alias for the top splitter, so

<seelog>
    <outputs>
        <file path="split.log"/>
        <console />
    </outputs>
</seelog>

has the same meaning as

<seelog>
    <splitter>
        <file path="split.log"/>
        <console />
    </splitter>
</seelog>

,but the latter is not syntactically correct.

Filter dispatcher

Function: Sends received messages to all children nodes only if the log level of the received message is in the 'allowed' list

Element name: Filter

Allowed attributes:

  • formatid - format that will be inherited by all children nodes that doesn't override it
  • levels - a list of comma delimited log level identifiers (Log levels) that are in the 'allowed' list

Example:

<seelog>
    <outputs>
        <filter levels="trace,debug">
	    <file path="filter.log"/>
	</filter>
        <console />
    </outputs>
</seelog>

Demonstration

A working demo of dispatcher/receiver functionality can be found here: examples/outputs

Clone this wiki locally