lib/fume/smart_logger.rb in fume-0.3.2 vs lib/fume/smart_logger.rb in fume-0.3.3
- old
+ new
@@ -5,14 +5,14 @@
def self.create(name)
case name
when "STDOUT"
Logger.new(STDOUT)
when /(\w+)/
- Logger.new("log/#{$1}.log")
+ Logger.new(Rails.root.join("log", "#{$1}.log"))
when /(\w+\.\w+)/
- Logger.new("log/#{$1}")
+ Logger.new(Rails.root.join("log", $1))
else
- Logger.new("log/#{Rails.env}.log")
+ Logger.new(Rails.root.join("log", "#{Rails.env}.log"))
end
end
end
end
\ No newline at end of file