lib/onering/cli.rb in onering-client-0.0.87 vs lib/onering/cli.rb in onering-client-0.0.88
- old
+ new
@@ -24,10 +24,12 @@
end
def self.output(data, format)
return nil if @_args[:quiet]
+ Onering::Logger.debug("Outputting data as #{format}:", "Onering::CLI")
+
case format
when 'text'
if data.is_a?(Hash)
data.coalesce.each do |k,v|
puts k.to_s+': '+v.to_s
@@ -49,10 +51,10 @@
when 'yaml'
puts YAML.dump(data)
else
- raise "Unknown output format #{format.inspect}"
+ Onering::Logger.error("Unknown output format #{format.inspect}", "Onering::CLI")
end
nil
end
end