Skip to content

Commit

Permalink
Remove debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods committed Jan 18, 2025
1 parent 11d9970 commit 872f717
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 38 deletions.
16 changes: 8 additions & 8 deletions scripts-dev/complement.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,14 @@ extra_test_args=()
test_packages=(
./tests/csapi
./tests
# ./tests/msc3874
# ./tests/msc3890
# ./tests/msc3391
# ./tests/msc3757
# ./tests/msc3930
# ./tests/msc3902
# ./tests/msc3967
# ./tests/msc4140
./tests/msc3874
./tests/msc3890
./tests/msc3391
./tests/msc3757
./tests/msc3930
./tests/msc3902
./tests/msc3967
./tests/msc4140
)

# Enable dirty runs, so tests will reuse the same container where possible.
Expand Down
2 changes: 1 addition & 1 deletion synapse/event_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def _is_membership_change_allowed(
invite_level = get_named_level(auth_events, "invite", 0)
ban_level = get_named_level(auth_events, "ban", 50)

logger.info(
logger.debug(
"_is_membership_change_allowed: %s",
{
"caller_membership": caller.membership if caller else None,
Expand Down
4 changes: 0 additions & 4 deletions synapse/federation/federation_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,6 @@ async def _process_incoming_pdus_in_room_inner(
# has started processing).
while True:
async with lock:
logger.info("📬 handling received PDU in room %s: %s", room_id, event)
try:
with nested_logging_context(event.event_id):
# We're taking out a lock within a lock, which could
Expand All @@ -1271,9 +1270,6 @@ async def _process_incoming_pdus_in_room_inner(
await self._federation_event_handler.on_receive_pdu(
origin, event
)
logger.info(
"✅ handled received PDU in room %s: %s", room_id, event
)
except FederationError as e:
# XXX: Ideally we'd inform the remote we failed to process
# the event, but we can't return an error in the transaction
Expand Down
5 changes: 0 additions & 5 deletions synapse/handlers/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,6 @@ async def do_invite_join(
content: The event content to use for the join event.
"""
logger.info("🧲 do_invite_join for %s in %s", joinee, room_id)

# TODO: We should be able to call this on workers, but the upgrading of
# room stuff after join currently doesn't work on workers.
# TODO: Before we relax this condition, we need to allow re-syncing of
Expand Down Expand Up @@ -1053,8 +1051,6 @@ async def on_invite_request(
Respond with the now signed event.
"""
logger.info("🗳️ on_invite_request: handling event %s", event)

if event.state_key is None:
raise SynapseError(400, "The invite event did not have a state key")

Expand Down Expand Up @@ -1131,7 +1127,6 @@ async def on_invite_request(
await self.store.remove_push_actions_from_staging(event.event_id)
raise

logger.info("✅ on_invite_request: handled event %s", event)
return event

async def do_remotely_reject_invite(
Expand Down
8 changes: 0 additions & 8 deletions synapse/handlers/federation_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,6 @@ async def on_send_membership_event(
event.event_id,
event.signatures,
)
# logger.info(
# "📮 on_send_membership_event: received event: %s",
# event,
# )

if get_domain_from_id(event.sender) != origin:
logger.info(
Expand Down Expand Up @@ -440,10 +436,6 @@ async def on_send_membership_event(

await self._check_for_soft_fail(event, context=context, origin=origin)
await self._run_push_actions_and_persist_event(event, context)
# logger.info(
# "✅ on_send_membership_event: handled event: %s",
# event,
# )
return event, context

async def check_join_restrictions(
Expand Down
6 changes: 1 addition & 5 deletions synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -1415,8 +1415,6 @@ async def handle_new_client_event(
PartialStateConflictError if attempting to persist a partial state event in
a room that has been un-partial stated.
"""
for event, _ in events_and_context:
logger.info("📮 handle_new_client_event: handling %s", event)

extra_users = extra_users or []

Expand Down Expand Up @@ -1463,7 +1461,7 @@ async def handle_new_client_event(
event, batched_auth_events
)
except AuthError as err:
logger.warning("Denying new event %r because %s", event, err)
logger.warning("Denying new event %r because %s", event, err)
raise err

# Ensure that we can round trip before trying to persist in db
Expand Down Expand Up @@ -1495,8 +1493,6 @@ async def handle_new_client_event(
gather_results(deferreds, consumeErrors=True)
).addErrback(unwrapFirstError)

for event, _ in events_and_context:
logger.info("✅ handle_new_client_event: handled %s", event)
return result

async def _persist_events(
Expand Down
1 change: 0 additions & 1 deletion synapse/notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ async def on_new_room_events(
notify_new_room_events with the results."""
event_entries = []
for event, pos in events_and_pos:
logger.info("📨 Notifying about new event %s", event, exc_info=True)
entry = self.create_pending_room_event_entry(
pos,
extra_users,
Expand Down
6 changes: 0 additions & 6 deletions synapse/storage/databases/main/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -2836,8 +2836,6 @@ def _store_room_members_txn(
for backfilled events because backfilled events in the past do
not affect the current local state.
"""
for event in events:
logger.info("🔦 _store_room_members_txn update room_memberships: %s", event)

self.db_pool.simple_insert_many_txn(
txn,
Expand Down Expand Up @@ -2894,10 +2892,6 @@ def _store_room_members_txn(
Membership.LEAVE,
)

logger.info(
"🔦 _store_room_members_txn update local_current_membership: %s",
event,
)
self.db_pool.simple_upsert_txn(
txn,
table="local_current_membership",
Expand Down

0 comments on commit 872f717

Please sign in to comment.