Skip to content
Snippets Groups Projects
Commit 6d4cfff0 authored by fxk8y's avatar fxk8y :spider:
Browse files

Reduce irrelevant logging spam

parent 1e489192
No related branches found
No related tags found
No related merge requests found
......@@ -390,10 +390,13 @@ class SpiderMQTT:
self.subscriptions = {}
self.pendingMessages = []
logging.basicConfig(format='[{asctime:s}][{levelname:s}] {name:s} in {funcName:s}(): {message:s}', datefmt='%H:%M:%S %d.%m.%Y', style='{', level=logging.DEBUG)
logging.basicConfig(format='[ {asctime:s} ][ {levelname:s} ] {name:s} in {funcName:s}(): {message:s}', datefmt='%H:%M:%S %d.%m.%Y', style='{', level=logging.DEBUG)
self.log = logging.getLogger(__name__)
# TODO: Make configurable !!
self.log.setLevel(logging.INFO)
client_id = 'SpiderMQTT[{:X}]'.format(random.randint(0x100000000000, 0xFFFFFFFFFFFF))
self.mqtt = mqtt.Client(client_id=client_id, clean_session=True)
self.mqtt.enable_logger(self.log)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment