aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-03-13 01:54:34 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-03-13 01:54:34 +0000
commit13ab55f7371a2d2f0311be97bb5ed6c8378725f7 (patch)
tree7b92ba2bf9362ba6d8d2dbb6b2171b62806c07fa /activesupport/lib
parentd5a4d5abb41c50f96b554374b937ffe49d472d7f (diff)
downloadrails-13ab55f7371a2d2f0311be97bb5ed6c8378725f7.tar.gz
rails-13ab55f7371a2d2f0311be97bb5ed6c8378725f7.tar.bz2
rails-13ab55f7371a2d2f0311be97bb5ed6c8378725f7.zip
Fixed that BufferedLogger should create its own directory if one doesnt already exist (closes #11285) [lotswholetime]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9013 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/buffered_logger.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/buffered_logger.rb b/activesupport/lib/active_support/buffered_logger.rb
index c46386c6b0..67b0a580ea 100644
--- a/activesupport/lib/active_support/buffered_logger.rb
+++ b/activesupport/lib/active_support/buffered_logger.rb
@@ -47,6 +47,7 @@ module ActiveSupport
@log = open(log, (File::WRONLY | File::APPEND))
@log.sync = true
else
+ FileUtils.mkdir_p(File.dirname(log))
@log = open(log, (File::WRONLY | File::APPEND | File::CREAT))
@log.sync = true
@log.write("# Logfile created on %s" % [Time.now.to_s])