Skip to content

Instantly share code, notes, and snippets.

@shamil614
Created June 10, 2016 16:57
Show Gist options
  • Save shamil614/6bd83fd3cdfa6865dbe9678515b4a30d to your computer and use it in GitHub Desktop.
Save shamil614/6bd83fd3cdfa6865dbe9678515b4a30d to your computer and use it in GitHub Desktop.
Snipped of how Logstash is setup
require "logstash-logger"
# Sensible configuration options that we want to share accross ENVs
Rails.application.configure do
# Logstash has a bunch more config options that have sensible defaults.
config.logstash.uri = ENV["LOG_SERVER"]
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = ENV["LOG_LEVEL"] || :info
# Optional, Rails 4 defaults to true in development and false in production
config.autoflush_log = false
# not needed since the logging instance is on the same network
config.logstash.ssl_enable = false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment