class ProxyLogger
Ruby on Rails edge
Since edgeActive Support Proxy Logger
The proxy logger, is a logger that forwards all received logs to another logger, but has its own independent severity level.
This is useful when you want some library you have no control over to use the same logger as the rest of your application, but to have a different severity level because it is logging too much:
SomeLibrary.logger = ActiveSupport::ProxyLogger.new(Rails.logger, :error)
It can also ignore individual messages matching given patterns, when a library is only noisy on some logs your application doesn’t care about:
SomeLibrary.logger = ActiveSupport::ProxyLogger.new(Rails.logger).ignore(/Noisy/)
Almost all of the standard Logger interface is supported.
Note that the proxy logger can only suppress some logs, if the proxy severity is lower than the severity of the proxied logger, the logs won’t be emitted.
Inherits from
Includes
Methods (defined here)
Methods (inherited)
From ActiveSupport::LoggerSilence
(1)
- # silence
From Object
(17)
- # acts_like?
- # blank?
- # deep_dup
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # presence
- # presence_in
- # present?
- # to_param
- # to_query
- # try
- # try!
- # with
- # with_options
From ActiveSupport::Concern
(3)
- # class_methods
- # included
- # prepended
From ActiveSupport::NumericWithFormat
(2)
- # to_formatted_s
- # to_fs