0.0
No commit activity in last 3 years
No release in over 3 years
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
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.4
~> 2.4

Runtime

>= 3.0
 Project Readme

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 © 2011 Erik Gustavson

See LICENSE.txt for details.