# File lib/heroku/commands/logs.rb, line 13
    def index
      init_colors

      options = []
      until args.empty? do
        case args.shift
          when "-t", "--tail"   then options << "tail=1"
          when "-n", "--num"    then options << "num=#{args.shift.to_i}"
          when "-p", "--ps"     then options << "ps=#{URI.encode(args.shift)}"
          when "-s", "--source" then options << "source=#{URI.encode(args.shift)}"
          end
      end

      @line_start = true
      @token = nil

      heroku.read_logs(app, options) do |chk|
        next unless output = format_with_colors(chk)
        puts output
      end
    end