diff --git a/evennia/server/amp_client.py b/evennia/server/amp_client.py index c05e999657..1d06b33a70 100644 --- a/evennia/server/amp_client.py +++ b/evennia/server/amp_client.py @@ -102,7 +102,7 @@ class AMPServerClientProtocol(amp.AMPMultiConnectionProtocol): Called when a new connection is established. """ - print("AMPClient new connection {}".format(self)) + # print("AMPClient new connection {}".format(self)) info_dict = self.factory.server.get_info_dict() super(AMPServerClientProtocol, self).connectionMade() # first thing we do is to request the Portal to sync all sessions @@ -129,7 +129,7 @@ class AMPServerClientProtocol(amp.AMPMultiConnectionProtocol): (sessid, kwargs). """ - print("server data_to_portal: {}, {}, {}".format(command, sessid, kwargs)) + # print("server data_to_portal: {}, {}, {}".format(command, sessid, kwargs)) return self.callRemote(command, packed_data=amp.dumps((sessid, kwargs))).addErrback( self.errback, command.key) diff --git a/evennia/server/portal/amp.py b/evennia/server/portal/amp.py index 016523b78c..ae0c123e87 100644 --- a/evennia/server/portal/amp.py +++ b/evennia/server/portal/amp.py @@ -287,7 +287,7 @@ class AMPMultiConnectionProtocol(amp.AMP): """ Handle non-AMP messages, such as HTTP communication. """ - print("dataReceived: {}".format(data)) + # print("dataReceived: {}".format(data)) if data[:1] == NUL: # an AMP communication if data[-2:] != NULNUL: @@ -310,7 +310,7 @@ class AMPMultiConnectionProtocol(amp.AMP): # not an AMP communication, return warning self.transport.write(_HTTP_WARNING) self.transport.loseConnection() - print("HTTP received: %s" % data) + print("HTTP received (the AMP port should not receive http, only AMP!) %s" % data) def makeConnection(self, transport): """ @@ -330,7 +330,7 @@ class AMPMultiConnectionProtocol(amp.AMP): This is called when an AMP connection is (re-)established. AMP calls it on both sides. """ - print("connectionMade: {}".format(self)) + # print("connectionMade: {}".format(self)) self.factory.broadcasts.append(self) def connectionLost(self, reason): @@ -343,7 +343,7 @@ class AMPMultiConnectionProtocol(amp.AMP): portal will continuously try to reconnect, showing the problem that way. """ - print("ConnectionLost: {}: {}".format(self, reason)) + # print("ConnectionLost: {}: {}".format(self, reason)) try: self.factory.broadcasts.remove(self) except ValueError: @@ -362,7 +362,7 @@ class AMPMultiConnectionProtocol(amp.AMP): """ e.trap(Exception) - _LOGGER.log_err("AMP Error for {info}: {trcbck} {err}".format( + _get_logger().log_err("AMP Error for {info}: {trcbck} {err}".format( info=info, trcbck=e.getTraceback(), err=e.getErrorMessage())) def data_in(self, packed_data): diff --git a/evennia/server/portal/amp_server.py b/evennia/server/portal/amp_server.py index 18d1f8c72b..7009364868 100644 --- a/evennia/server/portal/amp_server.py +++ b/evennia/server/portal/amp_server.py @@ -228,7 +228,7 @@ class AMPServerProtocol(amp.AMPMultiConnectionProtocol): Send a status stanza to the launcher. """ - print("send status to launcher") + # print("send status to launcher") # print("self.get_status(): {}".format(self.get_status())) if self.factory.launcher_connection: self.factory.launcher_connection.callRemote( @@ -307,9 +307,9 @@ class AMPServerProtocol(amp.AMPMultiConnectionProtocol): self.factory.launcher_connection = self _, server_connected, _, _, _, _ = self.get_status() - logger.log_msg("Evennia Launcher->Portal operation %s:%s received" % (ord(operation), arguments)) + # logger.log_msg("Evennia Launcher->Portal operation %s:%s received" % (ord(operation), arguments)) - logger.log_msg("operation == amp.SSTART: {}: {}".format(operation == amp.SSTART, amp.loads(arguments))) + # logger.log_msg("operation == amp.SSTART: {}: {}".format(operation == amp.SSTART, amp.loads(arguments))) if operation == amp.SSTART: # portal start #15 # first, check if server is already running @@ -350,7 +350,7 @@ class AMPServerProtocol(amp.AMPMultiConnectionProtocol): self.factory.portal.shutdown() else: - logger.log_msg("Operation {} not recognized".format(operation)) + logger.log_err("Operation {} not recognized".format(operation)) raise Exception("operation %(op)s not recognized." % {'op': operation}) return {} @@ -391,7 +391,7 @@ class AMPServerProtocol(amp.AMPMultiConnectionProtocol): sessid, kwargs = self.data_in(packed_data) - logger.log_msg("Evennia Server->Portal admin data %s:%s received" % (sessid, kwargs)) + # logger.log_msg("Evennia Server->Portal admin data %s:%s received" % (sessid, kwargs)) operation = kwargs.pop("operation") portal_sessionhandler = self.factory.portal.sessions