summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMartin Gütlein <martin.guetlein@gmail.com>2010-02-23 16:07:15 +0100
committerMartin Gütlein <martin.guetlein@gmail.com>2010-02-23 16:07:15 +0100
commitceb2d32650ee20c1874cbd9e880f88b3ac175eb2 (patch)
tree283a422450314efe43ee5957b9da046bdccebe0e /lib
parent71b9c5c171a6b179de7e1372264844ad875f9660 (diff)
modify logging
Diffstat (limited to 'lib')
-rw-r--r--lib/environment.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/environment.rb b/lib/environment.rb
index c2fbeac..3329089 100644
--- a/lib/environment.rb
+++ b/lib/environment.rb
@@ -59,10 +59,10 @@ class MyLogger < Logger
# puts "-"
index = line.rindex(/\/.*\.rb/)
# raise "index = nil" if index==nil
- return line if index==nil
+ return line if index==nil || index<4
# puts "<<< "+line[index..-1].size.to_s+" <<< "+line[index..-1]
# raise "stop"
- line[index..-1]
+ ".."+line[(index-3)..-1]
end
def debug(param)
@@ -85,9 +85,8 @@ end
logfile = "#{LOG_DIR}/#{ENV["RACK_ENV"]}.log"
-#LOGGER = MyLogger.new(logfile,'daily') # daily rotation
-LOGGER = MyLogger.new(STDOUT)
-
+LOGGER = MyLogger.new(logfile,'daily') # daily rotation
+#LOGGER = MyLogger.new(STDOUT)
LOGGER.level = Logger::DEBUG
# RDF namespaces