chore: Update dependencies (#1173)

This commit is contained in:
Sojan Jose
2020-09-08 11:24:08 +05:30
committed by GitHub
parent 3ffb29bf4e
commit ac5d755545
33 changed files with 134 additions and 150 deletions

View File

@@ -78,12 +78,12 @@ Rails.application.configure do
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
if ENV['RAILS_LOG_TO_STDOUT'].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger = ActiveSupport::Logger.new($stdout)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
else
config.logger = ActiveSupport::Logger.new(
Rails.root.join('log', Rails.env + '.log'),
Rails.root.join("log/#{Rails.env}.log"),
1,
ENV.fetch('LOG_SIZE', '1024').to_i.megabytes
)

View File

@@ -92,10 +92,10 @@ Rails.application.configure do
# Use a different logger for distributed setups.
# require 'syslog/logger'
config.logger = ActiveSupport::Logger.new(Rails.root.join('log', Rails.env + '.log'), 1, ENV.fetch('LOG_SIZE', '1024').to_i.megabytes)
config.logger = ActiveSupport::Logger.new(Rails.root.join("log/#{Rails.env}.log"), 1, ENV.fetch('LOG_SIZE', '1024').to_i.megabytes)
if ENV['RAILS_LOG_TO_STDOUT'].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger = ActiveSupport::Logger.new($stdout)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
end

View File

@@ -21,7 +21,7 @@ module QueryTrace
def log_info_with_trace(event)
log_info_without_trace(event)
trace_log = Rails.backtrace_cleaner.clean(caller).first
logger.debug(" \\_ \e[33mCalled from:\e[0m " + trace_log) if trace_log && event.payload[:name] != 'SCHEMA'
logger.debug(" \\_ \e[33mCalled from:\e[0m #{trace_log}") if trace_log && event.payload[:name] != 'SCHEMA'
end
end