Configure Prosopite and remove CacheFreeLogger

This commit is contained in:
Justin Edmund 2025-02-07 01:35:14 -08:00
parent 2979ffb1e5
commit 6dcb15f10d
2 changed files with 14 additions and 10 deletions

View file

@ -76,4 +76,8 @@ Rails.application.configure do
# This makes it easy to tag log lines with debug information like subdomain and request id -
# both very helpful in debugging multi-user production applications.
config.log_tags = [:request_id]
config.after_initialize do
Prosopite.rails_logger = true
end
end

View file

@ -1,12 +1,12 @@
# frozen_string_literal: true
class CacheFreeLogger < ActiveSupport::Logger
def add(severity, message = nil, progname = nil, &block)
return true if progname&.include? 'CACHE'
super
end
end
ActiveRecord::Base.logger = CacheFreeLogger.new($stdout)
ActiveRecord::Base.logger.level = 1
# class CacheFreeLogger < ActiveSupport::Logger
# def add(severity, message = nil, progname = nil, &block)
# return true if progname&.include? 'CACHE'
#
# super
# end
# end
#
ActiveRecord::Base.logger = Logger.new(STDOUT)
# ActiveRecord::Base.logger.level = 1