Class: Rex::Logging::Sinks::TimestampFlatfile
- Defined in:
- lib/rex/logging/sinks/timestamp_flatfile.rb
Overview
This class implements the LogSink interface and backs it against a file on disk with a Timestamp.
Instance Method Summary collapse
Methods inherited from Flatfile
Methods included from LogSink
Constructor Details
This class inherits a constructor from Rex::Logging::Sinks::Flatfile
Instance Method Details
#log(sev, src, level, msg, from) ⇒ Object
:nodoc:
14 15 16 17 18 |
# File 'lib/rex/logging/sinks/timestamp_flatfile.rb', line 14 def log(sev, src, level, msg, from) # :nodoc: msg = msg.chop.gsub(/\x1b\[[0-9;]*[mG]/,'').gsub(/[\x01-\x02]/, " ") fd.write("[#{}] #{msg}\n") fd.flush end |