Remove experimental logstash feature.

* We'll most likely be extracting it into a plugin.
This commit is contained in:
Guo Xiang Tan 2017-10-31 10:15:22 +08:00
parent 85c749d6e4
commit d15068da70
1 changed files with 0 additions and 19 deletions

View File

@ -4,8 +4,6 @@ if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || ENV["
Rails.application.configure do
config.lograge.enabled = true
logstash_uri = ENV["LOGSTASH_URI"]
config.lograge.custom_options = lambda do |event|
exceptions = %w(controller action format id)
@ -14,23 +12,6 @@ if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || ENV["
database: RailsMultisite::ConnectionManagement.current_db,
time: event.time,
}
output[:type] = :rails if logstash_uri
output
end
if logstash_uri
require 'logstash-logger'
config.lograge.formatter = Lograge::Formatters::Logstash.new
config.lograge.logger = LogStashLogger.new(
type: :multi_delegator,
outputs: [
{ uri: logstash_uri },
{ type: :file, path: "#{Rails.root}/log/#{Rails.env}.log", sync: true }
]
)
end
end
end