Skip to content

Commit

Permalink
Remove logstash-logger gem from app. Fixes #598
Browse files Browse the repository at this point in the history
  • Loading branch information
k41n committed Jun 7, 2016
1 parent b2b5899 commit 71d6efe
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 27 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Expand Up @@ -26,7 +26,8 @@ gem 'localeapp', :require => false
gem 'human_attribute'
gem 'activerecord-session_store'
gem 'rails-observers'
gem 'logstash-logger'
gem 'lograge'
gem 'logstash-event'

platforms :jruby do
gem 'jruby-rack-worker', :require => false
Expand Down
11 changes: 6 additions & 5 deletions Gemfile.lock
Expand Up @@ -181,10 +181,11 @@ GEM
rack
rest-client
ya2yaml
lograge (0.3.6)
actionpack (>= 3)
activesupport (>= 3)
railties (>= 3)
logstash-event (1.2.02)
logstash-logger (0.15.2)
logstash-event (~> 1.2)
stud
loofah (2.0.3)
nokogiri (>= 1.5.9)
machinist (1.0.6)
Expand Down Expand Up @@ -326,7 +327,6 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.11)
stud (0.0.22)
test-unit (3.1.8)
power_assert
test_after_commit (1.0.0)
Expand Down Expand Up @@ -403,7 +403,8 @@ DEPENDENCIES
json
launchy
localeapp
logstash-logger
lograge
logstash-event
machinist (= 1.0.6)
mysql2
net-ldap
Expand Down
2 changes: 0 additions & 2 deletions config/application.tomcat.yml
Expand Up @@ -36,8 +36,6 @@
secret_key: <%= $servlet_context.getInitParameter("config.secret_key") %>

cache_path: <%= $servlet_context.getInitParameter("config.cache_path") %>
logstash_port: <%= $servlet_context.getInitParameter("config.logstash_port") %>
logstash_host: <%= $servlet_context.getInitParameter("config.logstash_host") %>

production:
<<: *development
Expand Down
8 changes: 0 additions & 8 deletions config/environments/development.rb
@@ -1,13 +1,5 @@
Jobsworth::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
config.logstash.progname = 'Jobsworth'
config.log_level = :info
config.logstash.formatter = ::Logger::Formatter
config.logstash.port = 5000
config.logstash.type = :udp
config.logstash.host = '0.0.0.0'
#config.logstash.ssl_enable = true

config.eager_load = false

# In the development environment your application's code is reloaded on
Expand Down
13 changes: 3 additions & 10 deletions config/environments/production.rb
Expand Up @@ -25,16 +25,9 @@

# Use a different logger for distributed setups
# config.logger = SyslogLogger.new
config.log_level = :info

if config.try(:jobsworth).try(:logstash_port).present? && config.try(:jobsworth).try(:logstash_host).present?
config.logstash.progname = 'Jobsworth'
config.logstash.formatter = :json_lines
config.logstash.port = config.jobsworth.logstash_port
config.logstash.type = :udp
config.logstash.host = config.jobsworth.logstash_host
config.logstash.ssl_enable = true
end
config.lograge.enabled = true
config.log_level = :error
config.lograge.formatter = Lograge::Formatters::Logstash.new

# Use a different cache store in production
# config.cache_store = :mem_cache_store
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/010_devise.rb
Expand Up @@ -25,7 +25,7 @@

# Devise 3.x store an encrypted token in the database and the actual token is
# sent only via e-mail to the user. Secret Key is requierd to encrypt those tokens.
if Rails.env.test? || ENV['CI'] || ENV['COMPILING_ASSETS']
if Rails.env.test? || ENV['CI']
config.secret_key = 'de38cd59bebbdb74ae5343cf4620771d624e569d66f6d88c82fc2978122f63814b52347f649875bbec7f1dc7f58e4263f07f6bbbdd233c41252d2d4f3bbfae67'
else
config.secret_key = Setting.devise.secret_key
Expand Down

0 comments on commit 71d6efe

Please sign in to comment.