projects
/
pazpar2-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5907cdb
)
Option -d dumps records to the current log file instead of stderr.
author
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 16 Jul 2007 09:00:22 +0000
(09:00 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Mon, 16 Jul 2007 09:00:22 +0000
(09:00 +0000)
NEWS
patch
|
blob
|
history
src/logic.c
patch
|
blob
|
history
diff --git
a/NEWS
b/NEWS
index
4a565fa
..
a8b1eaa
100644
(file)
--- a/
NEWS
+++ b/
NEWS
@@
-1,3
+1,5
@@
+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
Fixes for compilation on cygwin.
Z39.50 client code uses pz:elements. pz:elements was recognized in
diff --git
a/src/logic.c
b/src/logic.c
index
ce3eee6
..
f8a8f4d
100644
(file)
--- a/
src/logic.c
+++ b/
src/logic.c
@@
-1,4
+1,4
@@
-/* $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.
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
@@
-243,15
+243,19
@@
xmlDoc *record_to_xml(struct session_database *sdb, Z_External *rec)
return 0;
}
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
#if LIBXML_VERSION >= 20600
- xmlDocFormatDump(stderr, rdoc, 1);
+ xmlDocFormatDump(lf, rdoc, 1);
#else
#else
- xmlDocDump(stderr, rdoc);
+ xmlDocDump(lf, rdoc);
#endif
#endif
+ fprintf(lf, "\n");
+ }
}
return rdoc;
}
}
return rdoc;
}