RahulOnRails
RahulOnRails

Reputation: 6542

Heroku + Logs Command :: Can Logs Detail can be increased at Heroku

Is it possible to see the last log of Heroku server. I have used heroku logs to see the last process but it shows limited log. But i want to see more process done at heroku. So what command or what process should I follow to see the logs at Heroku.

Thanks in advance.

Upvotes: 4

Views: 1872

Answers (5)

Asnad Atta
Asnad Atta

Reputation: 4003

heroku logs -n 1000

to see 1000 logs lines you can change the no of lines

heroku logs -t

to see live logs

Upvotes: 1

dannymcc
dannymcc

Reputation: 3814

I don't think it's possible because on Heroku's own support page they recommend using external monitoring applications. They have likely limited it to 100 lines to prevent people from using it as their only debugging tool.

http://docs.heroku.com/logs-exceptions

Accessing your logs is intended primarily for use in debugging a newly uploaded application that is producing unexpected results, such as an exception or a 500 / FAILSAFE error. The logs displayed will be a jumble of results from the different servers your app happens to be running on, and will show only the most recent 100 lines.

If you have a site in production use by real users, use an external exception logging service. We can recommend Hoptoad and Get Exceptional. Both of these services are very simple to set up on Heroku, and provide an easy and structured way to look at all your production exceptions.

You should not attempt to use the output of the heroku logs command for metrics or usage analysis. For that, we recommend Google Analytics.

Alternative exception monitoring applications:

  • Exceptional (http://www.getexceptional.com/)
  • Airbrake (ex Hoptoadapp) (http://airbrake.io/pages/home)

There are also a few projects on Github that allow you to build an exception logging system into your application:

  • Exception Notifier (http://github.com/rails/exception_notification)
  • Exception Logger (http://github.com/defunkt/exception_logger)
  • Tartus (http://github.com/dinsley/tartarus)

Here are a couple of Railscasts tutorials by Ryan Bates on the topic:

  • Exception Notifications (http://railscasts.com/episodes/104-exception-notifications)
  • Handling Exceptions (http://railscasts.com/episodes/53-handling-exceptions)

I have just checked and the first suggestion, Exceptional, is actually available as an official Heroku add-on.

as is Hoptoadapp.

Upvotes: 6

Dan Croak
Dan Croak

Reputation: 1669

Since you asked this question, Heroku has released more robust logging:

http://docs.heroku.com/logging

There's a realtime tail and filtering options.

Upvotes: 4

shingara
shingara

Reputation: 46914

You can create a Specific logger to save all log in your Database.

Upvotes: 0

shingara
shingara

Reputation: 46914

You can use the LogWorm add-on to push all of your log into this service : http://addons.heroku.com/logworm

Upvotes: 0

Related Questions