Method: Mrsk::Commands::App#follow_logs

Defined in:
lib/mrsk/commands/app.rb

#follow_logs(host:, grep: nil) ⇒ Object



40
41
42
43
44
45
46
47
48
# File 'lib/mrsk/commands/app.rb', line 40

def follow_logs(host:, grep: nil)
  run_over_ssh \
    pipe(
      current_container_id,
      "xargs docker logs --timestamps --tail 10 --follow 2>&1",
      (%(grep "#{grep}") if grep)
    ),
    host: host
end