aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-12-22 04:04:56 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-12-22 04:04:56 +0000
commit778d6704d496f7812495e423aa27b54187db682a (patch)
tree2b2a12733171f5ece6277baed324b01456e9897b /actionpack
parentee1ef122d7214da438353b892e84d2513651ce74 (diff)
downloadrails-778d6704d496f7812495e423aa27b54187db682a.tar.gz
rails-778d6704d496f7812495e423aa27b54187db682a.tar.bz2
rails-778d6704d496f7812495e423aa27b54187db682a.zip
Add session ID to default logging, but remove the verbose description of every step [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3334 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG2
-rwxr-xr-xactionpack/lib/action_controller/base.rb1
-rw-r--r--actionpack/lib/action_controller/session/active_record_store.rb15
3 files changed, 3 insertions, 15 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 232e5995c8..93c86e09ab 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Add session ID to default logging, but remove the verbose description of every step [DHH]
+
* Add the following RJS methods: [Sam Stephenson]
* alert - Displays an alert() dialog
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 316490736b..5a169f8916 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -846,6 +846,7 @@ module ActionController #:nodoc:
def log_processing
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
logger.info " Parameters: #{@params.inspect}"
end
diff --git a/actionpack/lib/action_controller/session/active_record_store.rb b/actionpack/lib/action_controller/session/active_record_store.rb
index 321127495e..7642320747 100644
--- a/actionpack/lib/action_controller/session/active_record_store.rb
+++ b/actionpack/lib/action_controller/session/active_record_store.rb
@@ -279,9 +279,6 @@ class CGI
end
@session = @@session_class.new(:session_id => session_id, :data => {})
@session.save
- logger.debug "opened new session #{@session.session_id}" if logger
- else
- logger.debug "reopened session #{@session.session_id}" if logger
end
end
@@ -293,42 +290,30 @@ class CGI
# Restore session state. The session model handles unmarshaling.
def restore
if @session
- logger.debug "restore session #{@session.session_id}" if logger
@session.data
- else
- logger.debug "skipped restore nil session" if logger
end
end
# Save session store.
def update
if @session
- logger.debug "update session #{@session.session_id}" if logger
ActiveRecord::Base.silence { @session.save }
- else
- logger.debug "skipped update nil session" if logger
end
end
# Save and close the session store.
def close
if @session
- logger.debug "close session #{@session.session_id}" if logger
update
@session = nil
- else
- logger.debug "skipped close nil session" if logger
end
end
# Delete and close the session store.
def delete
if @session
- logger.debug "delete session #{@session.session_id}" if logger
ActiveRecord::Base.silence { @session.destroy }
@session = nil
- else
- logger.debug "skipped delete nil session" if logger
end
end