exabgp icon indicating copy to clipboard operation
exabgp copied to clipboard

Logging facility for ExaBGP

Open wonderg opened this issue 8 years ago • 3 comments

Hi,

It looks like for now logging facility can not be configured for exabgp https://github.com/Exa-Networks/exabgp/blob/master/lib/exabgp/logger.py

I found a similar request https://github.com/Exa-Networks/exabgp/issues/234 which is closed

wonderg avatar Aug 18 '17 23:08 wonderg

This is not how I use the logging (as you can filter message under a log level with syslog). Could you please explain why you would like to see this changed please so I can see if/how I can accommodate your needs please ?

thomas-mangin avatar Aug 29 '17 13:08 thomas-mangin

Sure. Python logging lib allows to configure facility and it would be great to have an ability to set ExaBGP facility,as example, thru env parameters like exabgp.log. facility=local2 or thru startup parameters or both.

Usecase is quite simple, this allows to configure different rules at rsyslog side for different applications easily based on facility level. As example, Some_application with facility local0 => write logs locally 2nd_application with facility local1 => send logs to ELK IP1:port 3rd_application with facility local2 => send logs to ELK2 IP2:port

wonderg avatar Sep 02 '17 00:09 wonderg

It seems like this feature has been already implemented in 4.2.18 https://github.com/Exa-Networks/exabgp/blob/4e61a91288833e1f85f41b02b21924e86516b82c/src/exabgp/logger/handler.py#L55

kpribylov avatar Oct 13 '23 07:10 kpribylov