about summary refs log tree commit homepage
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README10
1 files changed, 8 insertions, 2 deletions
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)