dwbutler / logstash-logger

Ruby logger that writes logstash events
MIT License
456 stars 118 forks source link

Allow to configure buffer_max_items for Connectable devices using URI #148

Open neerfri opened 6 years ago

neerfri commented 6 years ago

We are using URI in an environment variable in order to configure our LogstashLogger:

# Read the URI from an environment variable
logger = LogStashLogger.new(uri: ENV['LOGSTASH_URI'])

The default value for buffer_max_items was not enough for our production needs and currently cannot be controlled using the :uri option.

This PR adds support specifically for buffer_max_items but opens the door to type-specific options to be parsed / validated by individual device implementations.

neerfri commented 6 years ago

@dwbutler I have no idea what is causing the error for codeclimate. Your help will be appreciated.