Class: Mrsk::Commands::Auditor

Inherits:
Base
  • Object
show all
Defined in:
lib/mrsk/commands/auditor.rb

Constant Summary

Constants inherited from Base

Base::MAX_LOG_SIZE

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#container_id_for, #initialize, #run_over_ssh

Constructor Details

This class inherits a constructor from Mrsk::Commands::Base

Instance Method Details

#broadcast(line) ⇒ Object

Runs locally



12
13
14
15
16
# File 'lib/mrsk/commands/auditor.rb', line 12

def broadcast(line)
  if broadcast_cmd = config.audit_broadcast_cmd
    [ broadcast_cmd, tagged_broadcast_line(line) ]
  end
end

#record(line) ⇒ Object

Runs remotely



5
6
7
8
9
# File 'lib/mrsk/commands/auditor.rb', line 5

def record(line)
  append \
    [ :echo, tagged_record_line(line) ],
    audit_log_file
end

#revealObject



18
19
20
# File 'lib/mrsk/commands/auditor.rb', line 18

def reveal
  [ :tail, "-n", 50, audit_log_file ]
end