aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-09-05 12:36:40 +0000
committerJamis Buck <jamis@37signals.com>2005-09-05 12:36:40 +0000
commit9eef247339c1cc08de7be3d9f7ac9048cb62adcc (patch)
treea79abeec6eb443f73ecb91994f210290266f0dd3 /railties/lib
parentbfdb4375089cb16abd0a44e1a98194666986f491 (diff)
downloadrails-9eef247339c1cc08de7be3d9f7ac9048cb62adcc.tar.gz
rails-9eef247339c1cc08de7be3d9f7ac9048cb62adcc.tar.bz2
rails-9eef247339c1cc08de7be3d9f7ac9048cb62adcc.zip
Allow the selected environment to define RAILS_DEFAULT_LOGGER, and have Rails::Initializer use it if it exists.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2134 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/initializer.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb
index 37669adb42..13a1e1308a 100644
--- a/railties/lib/initializer.rb
+++ b/railties/lib/initializer.rb
@@ -61,6 +61,9 @@ module Rails
end
def initialize_logger
+ # if the environment has explicitly defined a logger, use it
+ return if defined?(RAILS_DEFAULT_LOGGER)
+
begin
logger = Logger.new(configuration.log_path)
logger.level = configuration.log_level
@@ -182,4 +185,4 @@ module Rails
[ File.join(RAILS_ROOT, 'app', 'controllers'), File.join(RAILS_ROOT, 'components') ]
end
end
-end \ No newline at end of file
+end