Path: blob/master/lib/rex/logging/log_sink.rb
19513 views
# -*- coding: binary -*-12module Rex3module Logging45###6#7# This abstract interface is what must be implemented by any class8# that would like to register as a log sink on a given LogDispatcher9# instance, such as the Framework object.10#11###12module LogSink1314def cleanup15end1617#18# This method must be implemented by any derived log sink classes and is19# intended to take the supplied parameters and persist them to an arbitrary20# medium.21#22def log(sev, src, level, msg)23raise NotImplementedError24end2526protected2728#29# This method returns the current timestamp in MM/DD/YYYY HH:Mi:SS format.30#31def get_current_timestamp32return ::Time.now.strftime("%m/%d/%Y %H:%M:%S")33end3435end3637end38end394041