Methods

Class/Module Index [+]

Quicksearch

Heroku::Command::Logs

display logs for an app

Public Instance Methods

drains() click to toggle source

logs:drains

DEPRECATED: use `heroku drains`

# File lib/heroku/command/logs.rb, line 40
def drains
  # deprecation notice added 09/30/2011
  display("~ `heroku logs:drains` has been deprecated and replaced with `heroku drains`")
  Heroku::Command::Drains.new.index
end
index() click to toggle source
logs

display recent log output

-n, --num NUM        # the number of lines to display
-p, --ps PS          # only display logs from the given process
-s, --source SOURCE  # only display logs from the given source
-t, --tail           # continually stream logs

Example:

$ heroku logs
2012-01-01T12:00:00+00:00 heroku[api]: Config add EXAMPLE by email@example.com
2012-01-01T12:00:01+00:00 heroku[api]: Release v1 created by email@example.com
# File lib/heroku/command/logs.rb, line 23
def index
  validate_arguments!

  opts = []
  opts << "tail=1"                                 if options[:tail]
  opts << "num=#{options[:num]}"                   if options[:num]
  opts << "ps=#{URI.encode(options[:ps])}"         if options[:ps]
  opts << "source=#{URI.encode(options[:source])}" if options[:source]

  log_displayer = ::Heroku::Helpers::LogDisplayer.new(heroku, app, opts)
  log_displayer.display_logs
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.