DEV: Don't use logstash for unicorn if ENV is blank.

This commit is contained in:
Guo Xiang Tan 2020-06-11 15:57:13 +08:00
parent d47dc1e92d
commit b66f2187f1
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20

View File

@ -2,7 +2,7 @@
# See http://unicorn.bogomips.org/Unicorn/Configurator.html
if ENV["LOGSTASH_UNICORN_URI"]
if (ENV["LOGSTASH_UNICORN_URI"] || "").length > 0
require_relative '../lib/discourse_logstash_logger'
logger DiscourseLogstashLogger.logger(uri: ENV['LOGSTASH_UNICORN_URI'], type: :unicorn)
end