From 13ab55f7371a2d2f0311be97bb5ed6c8378725f7 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson <david@loudthinking.com> Date: Thu, 13 Mar 2008 01:54:34 +0000 Subject: 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 --- activesupport/lib/active_support/buffered_logger.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activesupport/lib') 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]) -- cgit v1.2.3