diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-12-24 13:23:32 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-12-24 13:28:57 -0800 |
commit | 9b46379f75f384c86e42046ab03ce55231197c92 (patch) | |
tree | 33ffd8703db04f1bc299df03f12673fda2f888c7 /README | |
parent | 8d58b42d0255880d732ba0700597b312a8219f8f (diff) | |
download | clogger-9b46379f75f384c86e42046ab03ce55231197c92.tar.gz |
This lessens confusion for people configuring Clogger in config.ru, since "File" could be mistaken for Rack::File and "::File" needs to be specified.
Diffstat (limited to 'README')
-rw-r--r-- | README | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -36,7 +36,7 @@ is customizable so you can specify exactly which fields to log. require "clogger" use Clogger, :format => Clogger::Format::Combined, - :logger => ::File.open("/path/to/log", "ab"), + :path => "/path/to/log", :reentrant => true run YourApplication.new @@ -45,9 +45,15 @@ somewhere inside the "Rails::Initializer.run do |config|" block: config.middleware.use 'Clogger', :format => Clogger::Format::Combined, - :logger => ::File.open("/path/to/log", "ab"), + :path => "/path/to/log", :reentrant => false +Instead of specifying a :path, you may also specify a :logger object +that receives a "<<" method: + + use Clogger, :logger=> $stdout, :reentrant => true + run YourApplication.new + == VARIABLES * $http_* - HTTP request headers (e.g. $http_user_agent) |