Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Log some bits about event creation #4121

Merged
merged 2 commits into from
Oct 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/4121.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Log some bits about room creation
3 changes: 3 additions & 0 deletions synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,9 @@ def send_nonmember_event(self, requester, event, context, ratelimit=True):

if event.is_state():
prev_state = yield self.deduplicate_state_event(event, context)
logger.info(
"Not bothering to persist duplicate state event %s", event.event_id,
)
if prev_state is not None:
defer.returnValue(prev_state)

Expand Down
4 changes: 4 additions & 0 deletions synapse/handlers/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ def upgrade_room(self, requester, old_room_id, new_version):
creator_id=user_id, is_public=r["is_public"],
)

logger.info("Creating new room %s to replace %s", new_room_id, old_room_id)

# we create and auth the tombstone event before properly creating the new
# room, to check our user has perms in the old room.
tombstone_event, tombstone_context = (
Expand Down Expand Up @@ -522,6 +524,7 @@ def create(etype, content, **kwargs):
@defer.inlineCallbacks
def send(etype, content, **kwargs):
event = create(etype, content, **kwargs)
logger.info("Sending %s in new room", etype)
yield self.event_creation_handler.create_and_send_nonmember_event(
creator,
event,
Expand All @@ -544,6 +547,7 @@ def send(etype, content, **kwargs):
content=creation_content,
)

logger.info("Sending %s in new room", EventTypes.Member)
yield self.room_member_handler.update_membership(
creator,
creator.user,
Expand Down