- fprintf(get_file(), "%s:%d %s: ", file, line, msg);
- fprintf(get_file(), "%s\n", expr);
+ if (printit) {
+ fprintf(get_file(), "%s:%d %s: ", file, line, msg);
+ fprintf(get_file(), "%s\n", expr);
+ }
+ if (log_tests) {
+ yaz_log(YLOG_LOG, "%s:%d %s: ", file, line, msg);
+ yaz_log(YLOG_LOG, "%s\n", expr);
+ }