Permalink
Browse files

Don't generate strings to log unless they'll actually get logged.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7757 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 89eb533 commit 551f6e9beec301e288c1a6d253cfa5a08f609238 @jeremy jeremy committed Oct 6, 2007
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/base.rb
@@ -1097,7 +1097,7 @@ def initialize_current_url
end
def log_processing
- if logger
+ if logger && logger.info?
logger.info "\n\nProcessing #{controller_class_name}\##{action_name} (for #{request_origin}) [#{request.method.to_s.upcase}]"
logger.info " Session ID: #{@_session.session_id}" if @_session and @_session.respond_to?(:session_id)
logger.info " Parameters: #{respond_to?(:filter_parameters) ? filter_parameters(params).inspect : params.inspect}"

0 comments on commit 551f6e9

Please sign in to comment.