Skip to content

Commit

Permalink
Merge pull request #246 from sktston/feature/revert-more-log
Browse files Browse the repository at this point in the history
Remove more logs
  • Loading branch information
baegjae authored Feb 17, 2024
2 parents 4798dee + 4c476f5 commit a668704
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Connection request handler."""
import logging

from .....connections.models.conn_record import ConnRecord
from .....messaging.base_handler import BaseHandler, BaseResponder, RequestContext
Expand All @@ -8,8 +7,6 @@
from ..messages.connection_request import ConnectionRequest
from ..messages.problem_report import ConnectionProblemReport

LOGGER = logging.getLogger(__name__)


class ConnectionRequestHandler(BaseHandler):
"""Handler class for connection requests."""
Expand All @@ -22,8 +19,6 @@ async def handle(self, context: RequestContext, responder: BaseResponder):
context: Request context
responder: Responder callback
"""
LOGGER.info("TEMP_LOG_0629 " + "start handle")

self._logger.debug(f"ConnectionRequestHandler called with context {context}")
assert isinstance(context.message, ConnectionRequest)

Expand All @@ -38,17 +33,13 @@ async def handle(self, context: RequestContext, responder: BaseResponder):
)
mediation_id = mediation_metadata.get(MediationManager.METADATA_ID)

LOGGER.info("TEMP_LOG_0629 " + "after connection_record.metadata_get")

try:
connection = await mgr.receive_request(
context.message,
context.message_receipt,
mediation_id=mediation_id,
)

LOGGER.info("TEMP_LOG_0629 " + "after mgr.receive_request")

if connection.accept == ConnRecord.ACCEPT_AUTO:
response = await mgr.create_response(
connection, mediation_id=mediation_id
Expand All @@ -59,8 +50,6 @@ async def handle(self, context: RequestContext, responder: BaseResponder):
else:
self._logger.debug("Connection request will await acceptance")

LOGGER.info("TEMP_LOG_0629 " + "after responder.send_reply")

except ConnectionManagerError as e:
self._logger.exception("Error receiving connection request")
if e.error_code:
Expand Down
16 changes: 0 additions & 16 deletions aries_cloudagent/protocols/connections/v1_0/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,6 @@ async def receive_request(
The new or updated `ConnRecord` instance
"""

LOGGER.info("TEMP_LOG_0629 " + "start receive_request")
ConnRecord.log_state(
"Receiving connection request",
{"request": request},
Expand Down Expand Up @@ -540,8 +538,6 @@ async def receive_request(
"a prior connection request may have updated the connection state"
)

LOGGER.info("TEMP_LOG_0629 " + "after get_local_did or retrieve_by_invitation_key")

invitation = None
if connection:
async with self.profile.session() as session:
Expand All @@ -553,8 +549,6 @@ async def receive_request(
settings=self.profile.settings,
)

LOGGER.info("TEMP_LOG_0629 " + "after retrieve_invitation")

if connection.is_multiuse_invitation:
async with self.profile.session() as session:
wallet = session.inject(BaseWallet)
Expand Down Expand Up @@ -600,8 +594,6 @@ async def receive_request(
connection_key, keylist_updates
)

LOGGER.info("TEMP_LOG_0629 " + "after is_multiuse_invitation")

conn_did_doc = request.connection.did_doc
if not conn_did_doc:
raise ConnectionManagerError(
Expand All @@ -614,8 +606,6 @@ async def receive_request(
)
await self.store_did_document(conn_did_doc)

LOGGER.info("TEMP_LOG_0629 " + "after store_did_document")

if connection:
connection.their_label = request.label
connection.their_did = request.connection.did
Expand Down Expand Up @@ -646,8 +636,6 @@ async def receive_request(
connection.their_label = request.label
await connection.save(session, reason="connection is reused")

LOGGER.info("TEMP_LOG_0629 " + "after if connection")

if not connection: # request from public did and need new connection
async with self.profile.session() as session:
wallet = session.inject(BaseWallet)
Expand Down Expand Up @@ -692,8 +680,6 @@ async def receive_request(
session, reason="Received connection request from public DID"
)

LOGGER.info("TEMP_LOG_0629 " + "after if not connection")

async with self.profile.session() as session:
# Attach the connection request so it can be found and responded to
await connection.attach_request(session, request)
Expand All @@ -710,8 +696,6 @@ async def receive_request(
oob_processor = self.profile.inject(OobMessageProcessor)
await oob_processor.clean_finished_oob_record(self.profile, request)

LOGGER.info("TEMP_LOG_0629 " + "end receive_request")

return connection

async def create_response(
Expand Down

0 comments on commit a668704

Please sign in to comment.