mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
EXPERIMENTAL: Allow logs to be shipped via different methods.
See https://github.com/dwbutler/logstash-logger#uri-configuration for a list of available methods.
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
# See http://unicorn.bogomips.org/Unicorn/Configurator.html
|
||||
|
||||
if ENV["UNICORN_JSON_LOG_FORMAT"]
|
||||
unicorn_logger = Logger.new($stderr)
|
||||
require_relative '../lib/unicorn/unicorn_json_log_formatter'
|
||||
unicorn_logger.formatter = UnicornJSONLogFormatter.new
|
||||
logger unicorn_logger
|
||||
if ENV["LOGSTASH_URI"]
|
||||
require_relative '../lib/discourse_logstash_logger'
|
||||
logger DiscourseLogstashLogger.logger(uri: ENV['LOGSTASH_URI'], type: :unicorn)
|
||||
end
|
||||
|
||||
# enable out of band gc out of the box, it is low risk and improves perf a lot
|
||||
|
||||
Reference in New Issue
Block a user