graylog-labs / gelf-rb

Ruby GELF library (Graylog Extended Log Format)
https://rubygems.org/gems/gelf
MIT License
153 stars 104 forks source link

Allow injecting a sender. #28

Closed craigw closed 8 years ago

craigw commented 9 years ago

This is useful for adding e.g. a TCP sender which may not necessarily be packaged in gelf-rb.

Note that passing in your own sender does make the host and port a little pointless. This may be something to address in a future refactoring?

joschi commented 9 years ago

Thanks for contributing to this project! To continue merging this PR, we need you to sign our Individual Contributor Assignment Agreement as described in https://www.graylog.org/contributing-to-graylog/

milgner commented 8 years ago

In the latest version of the gem, initialisation of the transport/sender is done in GELF::Notifier#create_sender. For those rare cases that require a custom implementation, wouldn't it be easier to subclass and override that method?