Continue to log to Rails default log file when LogStashLogger is
enabled.
This commit is contained in:
parent
53cadbdfc5
commit
fba0c9e51e
|
@ -22,7 +22,14 @@ if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || ENV["
|
||||||
require 'logstash-logger'
|
require 'logstash-logger'
|
||||||
|
|
||||||
config.lograge.formatter = Lograge::Formatters::Logstash.new
|
config.lograge.formatter = Lograge::Formatters::Logstash.new
|
||||||
config.lograge.logger = LogStashLogger.new(uri: logstash_uri)
|
|
||||||
|
config.lograge.logger = LogStashLogger.new(
|
||||||
|
type: :multi_delegator,
|
||||||
|
outputs: [
|
||||||
|
{ uri: logstash_uri },
|
||||||
|
{ type: :file, path: "#{Rails.root}/log/#{Rails.env}.log" }
|
||||||
|
]
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue