Pretty Logger is a logging framework which can be checked from webpage, and also you can also debug easily with highlight method. You can also override logger class with Pretty logger so you can keep hourly logs, which can be limited as you wish.
visit http://your-webpage/rails-pretty-logger/dashboards/ then choose your environment, which you want to check and also you can set date range for narrowing down your logs.
How to use debug Highlighter
Use Hourly Log Rotation
Add these lines below to environment config file which you want to override its logger, first argument for name of the log file, second argument for keeping hourly logs, file count for limiting the logs files.
Rails::Pretty::Logger::ConsoleLogger.new("rails-pretty-logger", "hourly", file_count: 48)
#/config/environments/development.rb require "rails/pretty/logger/config/logger_config" logger_file = ActiveSupport::TaggedLogging.new(Rails::Pretty::Logger::ConsoleLogger.new("rails-pretty-logger", "hourly", file_count: 48)) config.logger = logger_file
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install rails-pretty-logger
Mount the engine in your config/routes.rb:
mount Rails::Pretty::Logger::Engine => "/rails-pretty-logger"
- Fork the official repository.
- Create a topic branch.
- Implement your feature or bug fix.
- Add, commit, and push your changes.
- Submit a pull request.
The gem is available as open source under the terms of the MIT License.