As you're linking the test executable against  libhybris-common you can use it's logging functionality instead of using plain fprintf.