aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-09-27 11:54:53 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-09-27 11:58:21 -0400
commit6e5bcc69bc3ec6997212605ec43420997e4ed731 (patch)
tree1a230d02478c589d2b7803376a76b542db7aabf7
parent8d04d3d8fd992ee304ea069df203fa7081ee54df (diff)
downloadkutter-6e5bcc69bc3ec6997212605ec43420997e4ed731.tar.gz
kutter-6e5bcc69bc3ec6997212605ec43420997e4ed731.tar.xz
kutter-6e5bcc69bc3ec6997212605ec43420997e4ed731.zip
gcode: Make dump_debug() output atomic
Build a single (very large) logging message with the debug state. This prevents the output from being fragmented. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--klippy/gcode.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/klippy/gcode.py b/klippy/gcode.py
index 49fed250..c52edf80 100644
--- a/klippy/gcode.py
+++ b/klippy/gcode.py
@@ -78,10 +78,12 @@ class GCodeParser:
if self.fan is not None:
self.fan.set_speed(print_time, 0.)
def dump_debug(self):
- logging.info("Dumping gcode input %d blocks" % (
+ out = []
+ out.append("Dumping gcode input %d blocks" % (
len(self.input_log),))
for eventtime, data in self.input_log:
- logging.info("Read %f: %s" % (eventtime, repr(data)))
+ out.append("Read %f: %s" % (eventtime, repr(data)))
+ logging.info("\n".join(out))
# Parse input into commands
args_r = re.compile('([A-Z_]+|[A-Z*])')
def process_commands(self, commands, need_ack=True):