Capture container health log when unhealthy

This commit is contained in:
Jberczel
2023-05-03 14:15:46 -04:00
parent 38c85e8021
commit 0e19ead37c
6 changed files with 22 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
require "sshkit"
require "sshkit/dsl"
require "json"
class SSHKit::Backend::Abstract
def capture_with_info(*args, **kwargs)
@@ -9,4 +10,8 @@ class SSHKit::Backend::Abstract
def puts_by_host(host, output, type: "App")
puts "#{type} Host: #{host}\n#{output}\n\n"
end
def capture_with_pretty_json(*args, **kwargs)
JSON.pretty_generate(JSON.parse(capture(*args, **kwargs)))
end
end