Replace syslog() with printf() when compiled with -DTEST so we can test without polluting logs