Remove experimental logstash feature.
* We'll most likely be extracting it into a plugin.
This commit is contained in:
parent
85c749d6e4
commit
d15068da70
|
@ -4,8 +4,6 @@ if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || ENV["
|
||||||
Rails.application.configure do
|
Rails.application.configure do
|
||||||
config.lograge.enabled = true
|
config.lograge.enabled = true
|
||||||
|
|
||||||
logstash_uri = ENV["LOGSTASH_URI"]
|
|
||||||
|
|
||||||
config.lograge.custom_options = lambda do |event|
|
config.lograge.custom_options = lambda do |event|
|
||||||
exceptions = %w(controller action format id)
|
exceptions = %w(controller action format id)
|
||||||
|
|
||||||
|
@ -14,23 +12,6 @@ if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || ENV["
|
||||||
database: RailsMultisite::ConnectionManagement.current_db,
|
database: RailsMultisite::ConnectionManagement.current_db,
|
||||||
time: event.time,
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue