Capture container health log when unhealthy
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user