From 9b46379f75f384c86e42046ab03ce55231197c92 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 24 Dec 2010 13:23:32 -0800 Subject: accept a new :path argument in initialize This lessens confusion for people configuring Clogger in config.ru, since "File" could be mistaken for Rack::File and "::File" needs to be specified. --- README | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'README') diff --git a/README b/README index 59a6ced..c61e0da 100644 --- a/README +++ b/README @@ -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) -- cgit v1.2.3-24-ge0c7