Sha256: 50e7005ff8d0e35da35393632af8a24081093afe1e3fa73703062697eae9fe00
Contents?: true
Size: 349 Bytes
Versions: 3
Compression:
Stored size: 349 Bytes
Contents
require "logger" module Logstop class Formatter < ::Logger::Formatter def initialize(formatter = nil, ip: false) @formatter = formatter || ::Logger::Formatter.new @ip = ip end def call(severity, timestamp, progname, msg) Logstop.scrub(@formatter.call(severity, timestamp, progname, msg), ip: @ip) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
logstop-0.2.2 | lib/logstop/formatter.rb |
logstop-0.2.1 | lib/logstop/formatter.rb |
logstop-0.2.0 | lib/logstop/formatter.rb |