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
|
@comment = current_user.comment(text, :on => target) if target
|
||||||
if @comment
|
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|
|
respond_to do |format|
|
||||||
format.js{ render :json => { :post_id => @comment.post_id,
|
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}")
|
Rails.logger.info("event=registration status=successful user=#{@user.inspect}")
|
||||||
else
|
else
|
||||||
flash[:error] = @user.errors.full_messages.join(', ')
|
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
|
render :new
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -248,11 +248,11 @@ class User
|
||||||
# person.owner will always return a ProxyObject.
|
# person.owner will always return a ProxyObject.
|
||||||
# calling nil? performs a necessary evaluation.
|
# calling nil? performs a necessary evaluation.
|
||||||
unless person.owner.nil?
|
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)
|
person.owner.receive(post.to_diaspora_xml, self.person)
|
||||||
else
|
else
|
||||||
xml = salmon.xml_for person
|
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.add_post_request(person.receive_url, xml)
|
||||||
QUEUE.process
|
QUEUE.process
|
||||||
end
|
end
|
||||||
|
|
@ -285,20 +285,20 @@ class User
|
||||||
if comment.save
|
if comment.save
|
||||||
comment
|
comment
|
||||||
else
|
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
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def dispatch_comment(comment)
|
def dispatch_comment(comment)
|
||||||
if owns? comment.post
|
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.post_creator_signature = comment.sign_with_key(encryption_key)
|
||||||
comment.save
|
comment.save
|
||||||
aspects = aspects_with_post(comment.post_id)
|
aspects = aspects_with_post(comment.post_id)
|
||||||
push_to_people(comment, people_in_aspects(aspects))
|
push_to_people(comment, people_in_aspects(aspects))
|
||||||
elsif owns? comment
|
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
|
comment.save
|
||||||
push_to_people comment, [comment.post.person]
|
push_to_people comment, [comment.post.person]
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -97,10 +97,10 @@ class EMWebfinger
|
||||||
begin
|
begin
|
||||||
c.call(person)
|
c.call(person)
|
||||||
rescue Exception => e
|
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
|
end
|
||||||
}
|
}
|
||||||
Rails.logger.info("event=EMWebfinger status=complete response=#{person.inspect}")
|
Rails.logger.info("event=EMWebfinger status=complete target=#{@account}")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue