Don't inspect people in logging statements
This commit is contained in:
parent
24d4ea48ac
commit
a061999e30
4 changed files with 9 additions and 9 deletions
|
|
@ -15,7 +15,7 @@ class CommentsController < ApplicationController
|
|||
|
||||
@comment = current_user.comment(text, :on => target) if target
|
||||
if @comment
|
||||
Rails.logger.info("event=comment_create user=#{current_user.inspect} status=success comment=#{@comment.inspect}")
|
||||
Rails.logger.info("event=comment_create user=#{current_user.diaspora_handle} status=success comment=#{@comment.inspect}")
|
||||
|
||||
respond_to do |format|
|
||||
format.js{ render :json => { :post_id => @comment.post_id,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class RegistrationsController < Devise::RegistrationsController
|
|||
Rails.logger.info("event=registration status=successful user=#{@user.inspect}")
|
||||
else
|
||||
flash[:error] = @user.errors.full_messages.join(', ')
|
||||
Rails.logger.info("event=registration status=failure errors=#{@user.errors.full_messages.join(', ')}")
|
||||
Rails.logger.info("event=registration status=failure errors='#{@user.errors.full_messages.join(', ')}'")
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -248,11 +248,11 @@ class User
|
|||
# person.owner will always return a ProxyObject.
|
||||
# calling nil? performs a necessary evaluation.
|
||||
unless person.owner.nil?
|
||||
Rails.logger.debug("event=push_to_person route=local sender=#{self.inspect} recipient=#{person.inspect} payload_type=#{post.class}")
|
||||
Rails.logger.info("event=push_to_person route=local sender=#{self.diaspora_handle} recipient=#{person.diaspora_handle} payload_type=#{post.class}")
|
||||
person.owner.receive(post.to_diaspora_xml, self.person)
|
||||
else
|
||||
xml = salmon.xml_for person
|
||||
Rails.logger.debug("event=push_to_person route=remote sender=#{self.inspect} recipient=#{person.inspect} payload_type=#{post.class}")
|
||||
Rails.logger.info("event=push_to_person route=remote sender=#{self.diaspora_handle} recipient=#{person.diaspora_handle} payload_type=#{post.class}")
|
||||
QUEUE.add_post_request(person.receive_url, xml)
|
||||
QUEUE.process
|
||||
end
|
||||
|
|
@ -285,20 +285,20 @@ class User
|
|||
if comment.save
|
||||
comment
|
||||
else
|
||||
Rails.logger.warn "event=build_comment status=save_failure user=#{self.inspect} comment=#{comment.inspect}"
|
||||
Rails.logger.warn "event=build_comment status=save_failure user=#{self.diaspora_handle} comment=#{comment.inspect}"
|
||||
false
|
||||
end
|
||||
end
|
||||
|
||||
def dispatch_comment(comment)
|
||||
if owns? comment.post
|
||||
Rails.logger.info "event=dispatch_comment direction=downstream user=#{self.inspect} comment=#{comment.inspect}"
|
||||
Rails.logger.info "event=dispatch_comment direction=downstream user=#{self.diaspora_handle} comment=#{comment.inspect}"
|
||||
comment.post_creator_signature = comment.sign_with_key(encryption_key)
|
||||
comment.save
|
||||
aspects = aspects_with_post(comment.post_id)
|
||||
push_to_people(comment, people_in_aspects(aspects))
|
||||
elsif owns? comment
|
||||
Rails.logger.info "event=dispatch_comment direction=upstream user=#{self.inspect} comment=#{comment.inspect}"
|
||||
Rails.logger.info "event=dispatch_comment direction=upstream user=#{self.diaspora_handle} comment=#{comment.inspect}"
|
||||
comment.save
|
||||
push_to_people comment, [comment.post.person]
|
||||
end
|
||||
|
|
|
|||
|
|
@ -97,10 +97,10 @@ class EMWebfinger
|
|||
begin
|
||||
c.call(person)
|
||||
rescue Exception => e
|
||||
Rails.logger.info("event=EMWebfinger status=error_on_callback error=#{e.inspect}")
|
||||
Rails.logger.info("event=EMWebfinger status=error_on_callback error='#{e.inspect}'")
|
||||
end
|
||||
}
|
||||
Rails.logger.info("event=EMWebfinger status=complete response=#{person.inspect}")
|
||||
Rails.logger.info("event=EMWebfinger status=complete target=#{@account}")
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue