aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/serialqueue.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-11-30 12:04:28 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-11-30 21:19:43 -0500
commit4f07ee4d92732d0b619553d366b50b4b758c3d87 (patch)
treee4bf83d205001cafba04725aa6b1da9254620575 /klippy/serialqueue.c
parentb14db404b55424ef783a163a02da8868120b36c9 (diff)
downloadkutter-4f07ee4d92732d0b619553d366b50b4b758c3d87.tar.gz
kutter-4f07ee4d92732d0b619553d366b50b4b758c3d87.tar.xz
kutter-4f07ee4d92732d0b619553d366b50b4b758c3d87.zip
pyhelper: Add ability to route error messages to python logging
Instead of writing error messages to stderr, route them into the python code and use the standard python logging system. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/serialqueue.c')
-rw-r--r--klippy/serialqueue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/klippy/serialqueue.c b/klippy/serialqueue.c
index 6274e277..7e8e770b 100644
--- a/klippy/serialqueue.c
+++ b/klippy/serialqueue.c
@@ -300,7 +300,7 @@ message_alloc_and_encode(uint32_t *data, int len)
return qm;
fail:
- fprintf(stderr, "Encode error\n");
+ errorf("Encode error");
qm->len = 0;
return qm;
}
@@ -856,7 +856,7 @@ serialqueue_free_commandqueue(struct command_queue *cq)
if (!cq)
return;
if (!list_empty(&cq->ready_queue) || !list_empty(&cq->stalled_queue)) {
- fprintf(stderr, "Memory leak! Can't free non-empty commandqueue\n");
+ errorf("Memory leak! Can't free non-empty commandqueue");
return;
}
free(cq);