Class: Rex::Logging::Sinks::Flatfile

Inherits:
Stream
  • Object
show all
Defined in:
lib/rex/logging/sinks/flatfile.rb

Overview

This class implements the LogSink interface and backs it against a file on disk.

Direct Known Subclasses

TimestampColorlessFlatfile

Instance Attribute Summary

Attributes inherited from Stream

#stream

Instance Method Summary collapse

Methods inherited from Stream

#cleanup, #log, #log_code_for

Methods included from LogSink

#cleanup, #get_current_timestamp, #log

Constructor Details

#initialize(file) ⇒ Flatfile

Creates a flatfile log sink instance that will be configured to log to the supplied file path.


18
19
20
# File 'lib/rex/logging/sinks/flatfile.rb', line 18

def initialize(file)
  super(File.new(file, 'a'))
end