module Rex::Logging::LogSink

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.

Public Instance Methods

cleanup() click to toggle source
# File lib/rex/logging/log_sink.rb, line 15
def cleanup
end
log(sev, src, level, msg, from) click to toggle source

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.

# File lib/rex/logging/log_sink.rb, line 23
def log(sev, src, level, msg, from)
  raise NotImplementedError
end

Protected Instance Methods

get_current_timestamp() click to toggle source

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

# File lib/rex/logging/log_sink.rb, line 32
def get_current_timestamp
  return Time.now.strftime("%m/%d/%Y %H:%M:%S")
end