Class: Msf::MCP::Logging::Sinks::JsonFlatfile

Inherits:
JsonStream
  • Object
show all
Defined in:
lib/msf/core/mcp/logging/sinks/json_flatfile.rb

Overview

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

Instance Attribute Summary

Attributes inherited from JsonStream

#stream

Instance Method Summary collapse

Methods inherited from JsonStream

#cleanup, #log

Methods included from Rex::Logging::LogSink

#cleanup, #get_current_timestamp, #log

Constructor Details

#initialize(file) ⇒ JsonFlatfile

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



17
18
19
# File 'lib/msf/core/mcp/logging/sinks/json_flatfile.rb', line 17

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