Class: Blouson::SensitiveTableQueryLogSilencer
- Inherits:
-
Arproxy::Proxy
- Object
- Arproxy::Proxy
- Blouson::SensitiveTableQueryLogSilencer
- Defined in:
- lib/blouson/sensitive_table_query_log_silencer.rb
Instance Method Summary collapse
Instance Method Details
#execute(sql, context) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/blouson/sensitive_table_query_log_silencer.rb', line 3 def execute(sql, context) if !Rails.logger.debug? || !(Blouson::SENSITIVE_TABLE_REGEXP === sql) return super(sql, context) end ActiveRecord::Base.logger.silence(Logger::INFO) do Rails.logger.info " [Blouson::SensitiveTableQueryLogSilencer] SQL Log is skipped for sensitive table" super(sql, context) end end |