diff --git a/tests/test-gphoto2.c b/tests/test-gphoto2.c index 19ee25e02..dba711b4d 100644 --- a/tests/test-gphoto2.c +++ b/tests/test-gphoto2.c @@ -1,9 +1,17 @@ #include #include +#include + #include #define CHECK(f) {int res = f; if (res < 0) {printf ("ERROR: %s\n", gp_result_as_string (res)); exit (1);}} +static void +my_debug_func (const char *id, const char *msg, void *data) +{ + printf ("DEBUG: %s\n", msg); +} + int main (int argc, char *argv []) { @@ -15,6 +23,10 @@ main (int argc, char *argv []) * internally. */ + /* Just to show off a bit... */ + gp_debug_set_level (GP_DEBUG_LOW); + gp_debug_set_func (my_debug_func, NULL); + /* * You'll probably want to access your camera. You will first have * to create a camera (that is, allocating the memory).