mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-08 15:37:31 -06:00
klippy: Avoid using '%' syntax when calling logging module
The logging module can build strings directly from printf syntax - no need to build the string first. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
8f8951b4c1
commit
8d5a9143bb
8 changed files with 32 additions and 32 deletions
|
@ -159,7 +159,7 @@ class Printer:
|
|||
out.append(toolhead.stats(eventtime))
|
||||
for m in self.mcus:
|
||||
out.append(m.stats(eventtime))
|
||||
logging.info("Stats %.1f: %s" % (eventtime, ' '.join(out)))
|
||||
logging.info("Stats %.1f: %s", eventtime, ' '.join(out))
|
||||
return eventtime + 1.
|
||||
def add_object(self, name, obj):
|
||||
self.objects[name] = obj
|
||||
|
@ -217,8 +217,8 @@ class Printer:
|
|||
def run(self):
|
||||
systime = time.time()
|
||||
monotime = self.reactor.monotonic()
|
||||
logging.info("Start printer at %s (%.1f %.1f)" % (
|
||||
time.asctime(time.localtime(systime)), systime, monotime))
|
||||
logging.info("Start printer at %s (%.1f %.1f)",
|
||||
time.asctime(time.localtime(systime)), systime, monotime)
|
||||
# Enter main reactor loop
|
||||
try:
|
||||
self.reactor.run()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue