Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

removed interpolations that seemed to hurt rails

  • Loading branch information...
commit e491d4161562ac634387bccfe055abfae6be5afc 1 parent 36b9c5e
Rob Hurring authored
8  README.md
Source Rendered
@@ -50,12 +50,6 @@ The following can be used in the *path* or *in* options.
50 50
   <dt><strong>%&lt;rails_root>s</strong></dt>
51 51
   <dd>Will replace itself with Rails.root when in a rails app</dd>
52 52
 
53  
-  <dt><strong>%&lt;current>s</strong></dt>
54  
-  <dd>Will replace itself with the +dirname+ of the file</dd>
55  
-
56  
-  <dt><strong>%&lt;parent>s</strong></dt>
57  
-  <dd>Will replace itself with the parent directory of the file</dd>
58  
-
59 53
   <dt><strong>%&lt;class_name>s</strong></dt>
60 54
   <dd>Will replace itself with the name of the class.</dd>
61 55
 </dl>
@@ -118,7 +112,7 @@ Example Usage
118 112
   # inside a class with a custom formatter
119 113
   class Something
120 114
     include ClassLogger
121  
-    has_logger :path => "%&lt;current>s/log", :rotate => :daily, 
  115
+    has_logger :path => File.expand_path("../log", __FILE__), :rotate => :daily, 
122 116
       :formatter => proc{ |severity, time, program_name, message| "[%s](Something): %s\n" % [severity, message] }
123 117
 
124 118
     def initialize
4  lib/class_logger.rb
@@ -30,9 +30,7 @@ def loggers
30 30
     def setup_logger(options)
31 31
       interpolations = {
32 32
         :rails_root => (defined?(Rails) ? Rails.root : ''),
33  
-        :class_name => self.to_s.downcase,
34  
-        :current => File.dirname($FILENAME),
35  
-        :parent => File.expand_path('../../', $FILENAME)
  33
+        :class_name => self.to_s.downcase
36 34
       }
37 35
       
38 36
       file_path = File.join(options[:path], options[:in]).to_s % interpolations
2  lib/class_logger/version.rb
... ...
@@ -1,3 +1,3 @@
1 1
 module ClassLogger
2  
-  VERSION = "0.0.1"
  2
+  VERSION = "0.1"
3 3
 end

0 notes on commit e491d41

Please sign in to comment.
Something went wrong with that request. Please try again.