lib/attr_encrypted_pgcrypto/log_subscriber/postgres_pgp.rb
def sql_with_postgres_pgp(event)
        filter = /(pgp_sym_(encrypt|decrypt))\(((.|\n)*?)\)/i

        event.payload[:sql] = event.payload[:sql].gsub(filter) do |_|
          "#{$1}([FILTERED])"
        end

        sql_without_postgres_pgp(event)
      end
# Public: Prevents sensitive data from being logged
Prevents sensitive data from being logged
Prevents sensitive data from being logged
def sql_with_postgres_pgp(event)
        filter = /(pgp_sym_(encrypt|decrypt))\(((.|\n)*?)\)/i
        event.payload[:sql] = event.payload[:sql].gsub(filter) do |_|
          "#{$1}([FILTERED])"
        end
        sql_without_postgres_pgp(event)
      end
def sql_with_postgres_pgp ( event ) filter = / (pgp_sym_(encrypt|decrypt)) \( ((.| \n )*?) \) /i event . payload [ :sql ] = event . payload [ :sql ] . gsub ( filter ) do | _ | "#{$1}([FILTERED])" end sql_without_postgres_pgp ( event ) end
Public: Prevents sensitive data from being logged
Public : Prevents sensitive data from being logged
event