forked from cihub/seelog
-
Notifications
You must be signed in to change notification settings - Fork 13
Dispatcher reference
pkorotkov edited this page Feb 12, 2012
·
9 revisions
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.
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>
A working demo of dispatcher/receiver functionality can be found here: examples/outputs