lib/shelly/cli/main.rb in shelly-0.1.10 vs lib/shelly/cli/main.rb in shelly-0.1.11

- old
+ new

@@ -261,15 +261,16 @@ desc "logs", "Show latest application logs" method_option :cloud, :type => :string, :aliases => "-c", :desc => "Specify cloud" method_option :limit, :type => :numeric, :aliases => "-n", :desc => "Amount of messages to show" method_option :from, :type => :string, :desc => "Time from which to find the logs" + method_option :source, :type => :string, :aliases => "-s", :desc => "Limit logs to a single source, e.g. nginx" method_option :tail, :type => :boolean, :aliases => "-f", :desc => "Show new logs automatically" def logs cloud = options[:cloud] app = multiple_clouds(cloud, "logs") limit = options[:limit].to_i <= 0 ? 100 : options[:limit] - query = {:limit => limit} + query = {:limit => limit, :source => options[:source]} query.merge!(:from => options[:from]) if options[:from] logs = app.application_logs(query) print_logs(logs)