Log to Graylog server
Created by: pmather
Change production logging to log to a Graylog server GELF input. The Graylog server settings are specified in config/secrets.yml under a "graylog" key. The "enabled" key under "graylog" must be set to "true" to enable Graylog logging, otherwise the default Rails logger is used. The Ansible InstallScripts set an appropriate default.
We only enable Graylog logging for RAILS_ENV="production" mode by adding the code to set it up to config/environments/production.rb.
We use the "gelf" and "lograge" gems to do the logging. This is per the Graylog documentation on how to ingest Rails logs into Graylog. Note that the "lograge" gem produces much more concise logging than the standard Rails logger.