chore: Update dependencies (#1173)
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user