format_logs - basic log formatting¶ ↑
Description¶ ↑
Adds some simple formatting to the standard Rails BufferedLogger class.
This solution aims to be something between the default logging which is missing information such as timestamps, process IDs and severity levels and a full logging solution like log4r
Gem inspired by Paul Dowman’s better_logging
Features¶ ↑
Configurable settings - accepts a hash of options to adjust the output format.
Examples¶ ↑
These are the defaults
FormatLogs.settings = { :time_format => '%Y-%m-%d %H:%M:%S %z', :show_pid => true, :show_host => true, :show_time => true }
you can pass any combination of options you want:
FormatLogs.setting = {:show_pid => false}
Requirements¶ ↑
Rails 3.0+
Install¶ ↑
add:
gem require 'format_logs'
to your Gemfile and then run:
bundle update format_logs
Copyright¶ ↑
Copyright © 2011 Erik Gustavson
See LICENSE.txt for details.