| Number of watchers on Github | 222 |
| Number of open issues | 6 |
| Average time to close an issue | 5 months |
| Main language | Ruby |
| Average time to merge a PR | 2 days |
| Open pull requests | 1+ |
| Closed pull requests | 4+ |
| Last commit | over 1 year ago |
| Repo Created | over 5 years ago |
| Repo Last Updated | over 1 year ago |
| Size | 5.86 MB |
| Organization / Author | discourse |
| Contributors | 14 |
| Page Updated | 2018-03-19 |
| Do you use logster? Leave a review! | |
| View open issues (6) | |
| View logster activity | |
| View on github | |
| Fresh, new opensource launches 🚀🚀🚀 | |
|
Trendy new open source projects in your inbox!
View examples
|
|

Logster is an embedded Ruby exception reporting service
admins can view on live websites, at http://example.com/logs

Play with a live demo at logster.info/logs.
Add these lines to your application's Gemfile:
gem 'redis'
gem 'logster'
And then execute:
$ bundle
Make logster web available add the following to your routes.rb:
constraints lambda { |req| req.session["admin"] } do
mount Logster::Web => "/logs"
end
By default, logster will only run in development and production environments.
To run logster in other environments, in config/application.rb
Logster.set_environments([:development, :staging, :production])
Logster allows you to register a callback when the rate of errors has exceeded a given limit.
Tracking buckets available are one minute and an hour.
Example:
Logster.register_rate_limit_per_minute(Logger::WARN, 60) do |rate|
puts "O no! The error rate is now #{rate} errors/min"
end
Logster.register_rate_limit_per_hour([Logger::WARN, Logger::ERROR, Logger::FATAL], 60) do |rate|
puts "O no! The error rate is now #{rate} errors/hour"
end
If you are seeing the error No such middleware to insert before: ActionDispatch::DebugExceptions after installing logster,
then you are using a conflicting gem like better_errors or web-console.
To avoid this error, make sure logster is added behind those conflicting gems in your Gemfile.
admin_constraint = lambda do |request|
request.env['warden'].authenticate? and request.env['warden'].user.admin?
end
constraints admin_constraint do
mount Logster::Web, at: "/logs"
end
Out of the box, logster will use the default redis connection, to customise, in config/application.rb
Logster.store = Logster::RedisStore.new(redis_connection)
In case you may be using the rails_12factor gem in a production deployment on Heroku, the standard Rails.logger will not cooperate properly with Logster. Extend Rails.logger in your config/application.rb or config/initializers/logster.rb with:
if Rails.env.production?
Rails.logger.extend(ActiveSupport::Logger.broadcast(Logster.logger))
end
Logster UI is built using Ember.js
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)