Permalink
Browse files

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
  • Loading branch information...
1 parent ee1ef12 commit 778d6704d496f7812495e423aa27b54187db682a @dhh dhh committed Dec 22, 2005
View
@@ -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
@@ -846,6 +846,7 @@ def initialize_current_url
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
@@ -279,9 +279,6 @@ def initialize(session, option = nil)
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 @@ def model
# 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

0 comments on commit 778d670

Please sign in to comment.