Configure Prosopite and remove CacheFreeLogger
This commit is contained in:
parent
2979ffb1e5
commit
6dcb15f10d
2 changed files with 14 additions and 10 deletions
|
|
@ -76,4 +76,8 @@ Rails.application.configure do
|
||||||
# This makes it easy to tag log lines with debug information like subdomain and request id -
|
# 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.
|
# both very helpful in debugging multi-user production applications.
|
||||||
config.log_tags = [:request_id]
|
config.log_tags = [:request_id]
|
||||||
|
|
||||||
|
config.after_initialize do
|
||||||
|
Prosopite.rails_logger = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class CacheFreeLogger < ActiveSupport::Logger
|
# class CacheFreeLogger < ActiveSupport::Logger
|
||||||
def add(severity, message = nil, progname = nil, &block)
|
# def add(severity, message = nil, progname = nil, &block)
|
||||||
return true if progname&.include? 'CACHE'
|
# return true if progname&.include? 'CACHE'
|
||||||
|
#
|
||||||
super
|
# super
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
ActiveRecord::Base.logger = CacheFreeLogger.new($stdout)
|
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
||||||
ActiveRecord::Base.logger.level = 1
|
# ActiveRecord::Base.logger.level = 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue