lib/morph-cli.rb in morph-cli-0.2.1 vs lib/morph-cli.rb in morph-cli-0.2.2
- old
+ new
@@ -28,16 +28,18 @@
end
def self.log(line)
unless line.empty?
a = JSON.parse(line)
- if a["stream"] == "stdout"
- s = $stdout
- elsif a["stream"] == "stderr"
- s = $stderr
+ s = case a["stream"]
+ when "stdout", "internalout"
+ $stdout
+ when "stderr"
+ $stderr
else
raise "Unknown stream"
end
+
s.puts a["text"]
end
end
def self.config_path