Method: OpenC3::MessageLog#initialize

Defined in:
lib/openc3/utilities/message_log.rb

#initialize(tool_name, log_dir, tags: ['messages'], scope:) ⇒ MessageLog

Returns a new instance of MessageLog.

Parameters:

  • tool_name (String)

    The name of the tool creating the message log. This will be inserted into the message log filename to help identify it.

  • log_dir (String)

    The filesystem path to store the message log file.

  • tags (Array<String>) (defaults to: ['messages'])

    Array of strings to put into the filename



40
41
42
43
44
45
46
47
48
# File 'lib/openc3/utilities/message_log.rb', line 40

def initialize(tool_name, log_dir, tags: ['messages'], scope:)
  @remote_log_directory = "#{scope}/tool_logs/#{tool_name}/"
  @tags = tags.unshift(tool_name)
  @log_dir = log_dir
  @filename = ''
  @file = nil
  @start_day = nil
  @mutex = Mutex.new
end