Sha256: 733f1f46066a790bc8377ccbefcf6f4b9d54a715e78dc0366a7b8dc698b876f4

Contents?: true

Size: 266 Bytes

Versions: 1

Compression:

Stored size: 266 Bytes

Contents

require 'mysql2_query_filter'
require 'mysql2_query_filter/plugin/log'

module Mysql2QueryFilter::Plugin
  class Log < Filter
    Mysql2QueryFilter.register(:log, self)

    def filter(sql)
      out = @options[:out] || $stderr
      out.puts(sql)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mysql2_query_filter-plugin-log-0.0.1 lib/mysql2_query_filter/plugin/log.rb