Module: Bosh::Common::Logging

Defined in:
lib/common/logging/filters.rb,
lib/common/logging/regex_filter.rb

Defined Under Namespace

Classes: RegexFilter

Class Method Summary collapse

Class Method Details

.null_query_filterObject



4
5
6
7
8
9
10
# File 'lib/common/logging/filters.rb', line 4

def self.null_query_filter
  Bosh::Common::Logging::RegexFilter.new(
    [
      { /^\(\d+\.\d+s\) \(conn: \d+\) SELECT NULL$/ => nil },
    ],
  )
end

.query_redaction_filterObject



12
13
14
15
16
17
18
# File 'lib/common/logging/filters.rb', line 12

def self.query_redaction_filter
  Bosh::Common::Logging::RegexFilter.new(
    [
      { /^(\(\d+\.\d+s\) \(conn: \d+\) (INSERT INTO ("|`).*?("|`)|UPDATE ("|`).*?("|`)|DELETE FROM ("|`).*?("|`))).+/m => '\1 <redacted>' },
    ],
  )
end