In the previous chapters we learnt how to define sources, filters and destinations. We'll need to connect those components together, which is accomplished by the log statement. The needed syntax is here:
log { source(s1); source(s2); ... filter(f1); filter(f2); ... destination(d1); destination(d2); ... flags(flag1[, flag2...]); }; |
By default all matching log statements are processed, therefore a single log message might be sent to the same destination several times, given that destination is listed on several log statements.
This default behaviour can be changed by the flags() parameter.
Table 2-4. Log statement flags
Flag | Description |
---|---|
final | This flag means that the processing of log statements ends here. Note that this doesn't necessarily mean that matching messages will be stored once, as they can be matching log statements processed prior the current one. |
fallback | This flag makes a log statement 'fallback'. Being a fallback statement means that only messages not matching any 'non-fallback' log statements will be dispatched. |
catchall | This flag means that the source of the message is ignored, only the filters are taken into account when matching messages. |