colbygk/log4r — pull request #40 by bestmike007 (2014-12-09 09:59:50+00:00)
Title: Add integration support for rails with auto-reload feature

Auto replace rails logger with log4r

_To enable log4r integration_

``` ruby
# enable log4r integration
config.log4r.enabled = true
# maximum action handling time to log with level INFO, default: 500ms.
# config.log4r.action_mht = 500# auto-reload log4r configuration file from config/log4r.yaml (or config/log4r-production.yaml in production environment)
# config.log4r.auto_reload = true
```

_Example log4r configuraion_

``` yaml
# default log4r configuration for rails development environment.
log4r_config:
loggers:
- name : 'rails'
level : INFO
additive : false
trace : true
outputters :
- console

- name : 'rails::db'
level : DEBUG
additive : false
trace : false
outputters :
- console

- name : 'rails::controllers'
level : DEBUG
additive : false
trace : false
outputters :
- console

- name : 'rails::params'
level : INFO
additive : false
trace : false
outputters :
- console

- name : 'rails::models'
level : DEBUG
additive : false
trace : false
outputters :
- console

- name : 'rails::cache'
level : DEBUG
additive : false
trace : false
outputters :
- console

- name : 'rails::mailers'
level : DEBUG
additive : false
trace : false
outputters :
- console

# define all outputters (incl. formatters)
outputters:
- type: StdoutOutputter
name: console
formatter:
date_pattern: '%H:%M:%S'
pattern : '%d %l: %m'
type : PatternFormatter
```