Feature request - syslog equivalent for filter language
remco van mook
remco.vanmook at gmail.com
Fri Mar 22 13:29:24 CET 2019
Hi,
would it be possible to add a function to Bird that’s essentially the same as syslog in C? That way we can have filters/function log messages including severity which is very helpful for debugging and monitoring.
I tried to implement this in the bird configuration language itself, but got stuck on either of two points:
- Bird can’t concatenate strings
- function definitions need to have a predefined number of arguments
Ideally I’d like to replace a statement like
print "REJECTING: ",net.ip,"/",net.len," received from ",from," AS ",bgp_path.first,": Prefix is a martian";
with
syslog LOG_WARNING, "REJECTING: ",net.ip,"/",net.len," received from ",from," AS ",bgp_path.first,": Prefix is a martian”;
Right now I’m just commenting out the print statements that get hit too often to prevent spamming log files with ten thousands of rows, and ideally I’d like to use the log command that Bird uses for it’s own messages to set where these messages should go based on relevance.
thanks
Remco
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20190322/f2a0eebf/attachment.sig>
More information about the Bird-users
mailing list