diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-05-01 14:32:50 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-05-01 14:32:50 -0500 |
commit | e2af713d1c71b4f319e5435a63011a7bc23f77c3 (patch) | |
tree | 0397b4aea75e5c77eb6b288996769fbe24f65b60 /activesupport | |
parent | 9c20391bbe6ec1c56f8c8ed4aefb31a93576f76a (diff) | |
parent | 74436d2203eba186baebc1ddc82ff2202d0fc005 (diff) | |
download | rails-e2af713d1c71b4f319e5435a63011a7bc23f77c3.tar.gz rails-e2af713d1c71b4f319e5435a63011a7bc23f77c3.tar.bz2 rails-e2af713d1c71b4f319e5435a63011a7bc23f77c3.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index 64b2248e28..70b34c90e8 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -423,10 +423,12 @@ module Dependencies #:nodoc: protected def log_call(*args) - arg_str = args.collect(&:inspect) * ', ' - /in `([a-z_\?\!]+)'/ =~ caller(1).first - selector = $1 || '<unknown>' - log "called #{selector}(#{arg_str})" + if defined?(RAILS_DEFAULT_LOGGER) && RAILS_DEFAULT_LOGGER && log_activity + arg_str = args.collect(&:inspect) * ', ' + /in `([a-z_\?\!]+)'/ =~ caller(1).first + selector = $1 || '<unknown>' + log "called #{selector}(#{arg_str})" + end end def log(msg) |