whoops i was using pring instead of logger.debug! insane log filesize

This commit is contained in:
jane 2020-12-05 23:41:31 -05:00
parent 57a2e43456
commit 76937482ed
2 changed files with 8 additions and 9 deletions

View file

@ -97,5 +97,4 @@ def loop():
if __name__ == '__main__':
print('a')
#loop()
loop()

View file

@ -91,10 +91,10 @@ def jez(target, arg, index):
def _apply(index, target, arg, func):
if type(arg) is int:
print("ran: {} {} {} {}".format(index, func.__name__, target, arg))
logger.debug("ran: {} {} {} {}".format(index, func.__name__, target, arg))
return func(target, arg, index)
elif type(arg) is str and arg in this.values:
print("ran: {} {} {} {}".format(
logger.debug("ran: {} {} {} {}".format(
index, func.__name__, target, this.values[arg]))
return func(target, this.values[arg], index)
@ -103,7 +103,7 @@ def apply(index, targets, args, func):
j = index
for target in range(len(targets)):
if this.values[targets[target]['channel']] != None:
print("target: {}".format(targets[target]['channel']))
logger.debug("target: {}".format(targets[target]['channel']))
if target < len(args):
val, jump = _apply(
index, this.values[targets[target]['channel']], args[target], func)
@ -152,10 +152,10 @@ def pat(index, tick, previous_values):
args = this.pattern[i]['instruction']['args']
if this.instructions[name] != None:
jump = apply(i, targets, args, this.instructions[name])
# print("{} {} {} {} {}".format(jump, i, len(
# this.pattern), jump != i, jump <= len(this.pattern)))
logger.debug("{} {} {} {} {}".format(jump, i, len(
this.pattern), jump != i, jump <= len(this.pattern)))
if jump != i and jump <= len(this.pattern):
#print("jumping to {}".format(jump - 1))
logger.debug("jumping to {}".format(jump - 1))
i = jump - 1
i += 1
r = this.values["r"]
@ -177,7 +177,7 @@ def pat(index, tick, previous_values):
b = 255
elif b < 0:
b = 0
print("final color: {}".format((r, g, b)))
logger.debug("final color: {}".format((r, g, b)))
return (r, g, b)
else:
return default(index, tick)