Update 'mqtt_logger/__init__.py'
This commit is contained in:
parent
04111f5636
commit
8ee19a1355
@ -35,7 +35,7 @@ def main():
|
|||||||
if not os.path.isdir(logdir):
|
if not os.path.isdir(logdir):
|
||||||
os.makedirs(logdir)
|
os.makedirs(logdir)
|
||||||
log = open(logfile, 'a')
|
log = open(logfile, 'a')
|
||||||
log.write(msg.payload + '\n')
|
log.write(msg.payload.decode("utf-8") + '\n')
|
||||||
log.close()
|
log.close()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
logging.exception('Ececution interrupted by Keyboard Interrupt')
|
logging.exception('Ececution interrupted by Keyboard Interrupt')
|
||||||
|
Loading…
Reference in New Issue
Block a user