+Option -d dumps records to the current log file instead of stderr.
+
Fixes for compilation on cygwin.
Z39.50 client code uses pz:elements. pz:elements was recognized in
-/* $Id: logic.c,v 1.51 2007-07-13 09:25:41 adam Exp $
+/* $Id: logic.c,v 1.52 2007-07-16 09:00:22 adam Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
return 0;
}
- if (global_parameters.dump_records){
- fprintf(stderr,
- "Input Record (normalized) from %s\n----------------\n",
- db->url);
+ if (global_parameters.dump_records)
+ {
+ FILE *lf = yaz_log_file();
+ if (lf)
+ {
+ yaz_log(YLOG_LOG, "Normalized record from %s", db->url);
#if LIBXML_VERSION >= 20600
- xmlDocFormatDump(stderr, rdoc, 1);
+ xmlDocFormatDump(lf, rdoc, 1);
#else
- xmlDocDump(stderr, rdoc);
+ xmlDocDump(lf, rdoc);
#endif
+ fprintf(lf, "\n");
+ }
}
return rdoc;
}