aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/pyhelper.h
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/pyhelper.h
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/pyhelper.h')
-rw-r--r--klippy/pyhelper.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/klippy/pyhelper.h b/klippy/pyhelper.h
index ccf16ab8..bca65fd2 100644
--- a/klippy/pyhelper.h
+++ b/klippy/pyhelper.h
@@ -3,6 +3,8 @@
double get_time(void);
struct timespec fill_time(double time);
+void set_python_logging_callback(void (*func)(const char *));
+void errorf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
void report_errno(char *where, int rc);
char *dump_string(char *outbuf, int outbuf_size, char *inbuf, int inbuf_size);