summaryrefslogtreecommitdiff
path: root/lib/environment.rb
diff options
context:
space:
mode:
authorMartin Gütlein <martin.guetlein@gmail.com>2010-02-23 11:53:38 +0100
committerMartin Gütlein <martin.guetlein@gmail.com>2010-02-23 11:53:38 +0100
commit71b9c5c171a6b179de7e1372264844ad875f9660 (patch)
treeb04def2e5b8df2f7de3af118900d657502dba457 /lib/environment.rb
parentfdafd34343b420ad66b8ebf2b29fa4775830f73a (diff)
modify logging info
Diffstat (limited to 'lib/environment.rb')
-rw-r--r--lib/environment.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/environment.rb b/lib/environment.rb
index b796b6d..c2fbeac 100644
--- a/lib/environment.rb
+++ b/lib/environment.rb
@@ -46,7 +46,15 @@ class MyLogger < Logger
lines = caller(0)
# puts lines.join("\n")
# puts "-"
- line = lines[2]
+ n = 2
+ line = lines[n]
+
+ while (line =~ /spork.rb/ or line =~ /as_task/)
+ #puts "skip line "+line.to_s
+ n += 1
+ line = lines[n]
+ end
+
# puts line
# puts "-"
index = line.rindex(/\/.*\.rb/)
@@ -77,8 +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