From 4e2fa1f2d4a4a0fc687bd43c2a11f2781a35c592 Mon Sep 17 00:00:00 2001 From: Stephen Tiedemann Date: Fri, 9 Dec 2016 12:04:05 +0100 Subject: [PATCH] ndef attribute setting should be logged as DEBUG not INFO --- nfc/tag/tt3.py | 10 +++++----- nfc/tag/tt3_sony.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nfc/tag/tt3.py b/nfc/tag/tt3.py index 72bba963..1d175305 100644 --- a/nfc/tag/tt3.py +++ b/nfc/tag/tt3.py @@ -163,13 +163,13 @@ def _read_attribute_data(self): attributes = { 'ver': ver, 'nbr': nbr, 'nbw': nbw, 'nmaxb': nmaxb, 'writef': writef, 'rwflag': rwflag, 'ln': length} - log.info("got ndef attributes {0}".format(attributes)) + log.debug("got ndef attributes {0}".format(attributes)) return attributes else: log.debug("ndef attribute data checksum error") def _write_attribute_data(self, attributes): - log.info("set ndef attributes {0}".format(attributes)) + log.debug("set ndef attributes {0}".format(attributes)) attribute_data = bytearray(16) attribute_data[0] = attributes['ver'] attribute_data[1] = attributes['nbr'] @@ -205,7 +205,7 @@ def _read_ndef_data(self): except Type3TagCommandError: return None data = data[0:attributes['ln']] - log.info("got {0} byte ndef data {1}{2}".format( + log.debug("got {0} byte ndef data {1}{2}".format( len(data), hexlify(data[0:32]), ('','...')[len(data)>32])) return data @@ -215,7 +215,7 @@ def _write_ndef_data(self, data): attributes['writef'] = 0x0F self._write_attribute_data(attributes) - log.info("set {0} byte ndef data {1}{2}".format( + log.debug("set {0} byte ndef data {1}{2}".format( len(data), hexlify(data[0:32]), ('','...')[len(data)>32])) last_block_number = 1 + (len(data) + 15) // 16 @@ -388,7 +388,7 @@ def _format(self, version, wipe): attribute_data[0:5] = pack(">BBBH", 0x10, nbr, nbw, nmaxb) attribute_data[10] = 0x01 if nbw > 0 else 0x00 attribute_data[14:16] = pack(">H", sum(attribute_data[0:14])) - log.info("set ndef attributes {}".format(hexlify(attribute_data))) + log.debug("set ndef attributes {}".format(hexlify(attribute_data))) self.write_to_ndef_service(attribute_data, 0) # If required, we will also overwrite the memory with the diff --git a/nfc/tag/tt3_sony.py b/nfc/tag/tt3_sony.py index 16d2087c..0b9f1a2a 100644 --- a/nfc/tag/tt3_sony.py +++ b/nfc/tag/tt3_sony.py @@ -657,7 +657,7 @@ def _format(self, version=None, wipe=False): attribute_data = bytearray(16) attribute_data[:14] = pack(">BBBHxxxxBBxxx", 0x10, 4, 1, nmaxb, 0, 1) attribute_data[14:] = pack(">H", sum(attribute_data[:14])) - log.info("set ndef attributes {}".format(hexlify(attribute_data))) + log.debug("set ndef attributes {}".format(hexlify(attribute_data))) self.write_without_mac(attribute_data, 0) # Overwrite the ndef message area if a wipe is requested.