Module: Rex::Logging::LogSink

Included in:
Sinks::Flatfile, Sinks::Stderr
Defined in:
lib/rex/logging/log_sink.rb

Overview

This abstract interface is what must be implemented by any class that would like to register as a log sink on a given LogDispatcher instance, such as the Framework object.

Instance Method Summary collapse

Instance Method Details

#cleanupObject


15
16
# File 'lib/rex/logging/log_sink.rb', line 15

def cleanup
end

#get_current_timestampObject (protected)

This method returns the current timestamp in MM/DD/YYYY HH:Mi:SS format.


32
33
34
# File 'lib/rex/logging/log_sink.rb', line 32

def get_current_timestamp
  return Time.now.strftime("%m/%d/%Y %H:%M:%S")
end

#log(sev, src, level, msg) ⇒ Object

This method must be implemented by any derived log sink classes and is intended to take the supplied parameters and persist them to an arbitrary medium.


23
24
25
# File 'lib/rex/logging/log_sink.rb', line 23

def log(sev, src, level, msg)
  raise NotImplementedError
end