1
0
Fork 0

cleanup logger messages

This commit is contained in:
Kevin Matz 2018-10-25 12:41:41 -04:00
parent e94e89be85
commit 6ab15f8dbe
1 changed files with 9 additions and 10 deletions

View File

@ -48,15 +48,14 @@ class HogDevice():
osc = list(self.servers.values())[0]
else:
if (device.type.getText() != 'h'):
logger.warn("Only Hog type devices are curently supported.")
logger.error("ERROR: macro discarded!")
logger.error("ERROR: Only Hog type devices are supported.")
return
else:
try:
osc = self.servers[device.number.value]
except KeyError:
logger.warn("Net# "+str(device.number.value)+" not found.")
logger.error("ERROR: macro discarded!")
logger.error("ERROR: Net# " + str(device.number.value) +
" not found.")
return
osc.send(msg)
@ -71,11 +70,11 @@ class HogDevice():
else:
for i in ctx.master.targets:
if isinstance(i, int) is not True:
logger.error("GO MASTER macro targets must be intigers. "
logger.warn("GO MASTER macro targets must be intigers. "
+ str(i) + " is not an intigers.")
continue
if (i < 0):
logger.error("Master "+str(i)+" is not greater than 0.")
logger.warn("Master "+str(i)+" is not greater than 0.")
continue
master = str(i)
logger.info("GO on master " + master)
@ -89,11 +88,11 @@ class HogDevice():
else:
for i in ctx.master.targets:
if isinstance(i, int) is not True:
logger.error("GO MASTER macro targets must be intigers. "
logger.warn("GO MASTER macro targets must be intigers. "
+ str(i) + " is not an intigers.")
continue
if (i < 0):
logger.error("Master "+str(i)+" is not greater than 0.")
logger.warn("Master "+str(i)+" is not greater than 0.")
continue
master = str(i)
logger.info("HALT on master " + master)
@ -129,11 +128,11 @@ class HogDevice():
else:
for i in ctx.master.targets:
if isinstance(i, int) is not True:
logger.error("FADE MASTER macro targets must be intigers. "
logger.warn("FADE MASTER macro targets must be intigers. "
+ str(i) + " is not an intigers.")
continue
if (i < 0):
logger.error("Master "+str(i)+" is not greater than 0.")
logger.warn("Master "+str(i)+" is not greater than 0.")
continue
master = str(i)
logger.info("Fade Master "+master+" to "+str(level)+"%")