From 80486d644dd9e314aabb3843d40180165d457e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sun, 7 Sep 2014 17:32:02 +0200 Subject: [PATCH] Better logging for NOTIFY messages --- src/octoprint/plugins/discovery/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/octoprint/plugins/discovery/__init__.py b/src/octoprint/plugins/discovery/__init__.py index 2e8c3462..359738c6 100644 --- a/src/octoprint/plugins/discovery/__init__.py +++ b/src/octoprint/plugins/discovery/__init__.py @@ -266,7 +266,7 @@ class DiscoveryPlugin(octoprint.plugin.types.StartupPlugin, location = "http://{addr}:{port}/plugin/discovery/discovery.xml".format(addr=addr, port=port) - self.logger.debug("Sending NOTIFY alive") + self.logger.debug("Sending NOTIFY {}".format("alive" if alive else "byebye")) notify_message = "".join(["NOTIFY * HTTP/1.1\r\n", "Server: Python/2.7\r\n", "Cache-Control: max-age=900\r\n", "Location: {location}\r\n", "NTS: {nts}\r\n", "NT: upnp:rootdevice\r\n", "USN: uuid:{uuid}::upnp:rootdevice\r\n", "Host: 239.255.255.250:1900\r\n\r\n"]) message = notify_message.format(uuid=UUID, location=location, nts="ssdp:alive" if alive else "ssdp:byebye") for _ in xrange(2):