Skip to content

Commit

Permalink
ndef attribute setting should be logged as DEBUG not INFO
Browse files Browse the repository at this point in the history
  • Loading branch information
nehpetsde committed Dec 9, 2016
1 parent 2ecc859 commit 4e2fa1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions nfc/tag/tt3.py
Expand Up @@ -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']
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion nfc/tag/tt3_sony.py
Expand Up @@ -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.
Expand Down

0 comments on commit 4e2fa1f

Please sign in to comment.