From 73696559c68178180ea533cd501fbdad3a7ff76e Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 17 Jan 2002 21:03:36 +0000 Subject: [PATCH] More diagnostics in log. --- server/seshigh.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/server/seshigh.c b/server/seshigh.c index 3351c0e..5806a15 100644 --- a/server/seshigh.c +++ b/server/seshigh.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2001, Index Data * See the file LICENSE for details. * - * $Id: seshigh.c,v 1.122 2001-11-22 09:45:03 adam Exp $ + * $Id: seshigh.c,v 1.123 2002-01-17 21:03:36 adam Exp $ */ /* @@ -758,8 +758,8 @@ static Z_Records *diagrec(association *assoc, int error, char *addinfo) Z_DefaultDiagFormat *dr = (Z_DefaultDiagFormat *) odr_malloc (assoc->encode, sizeof(*dr)); - yaz_log(LOG_DEBUG, "Diagnostic: %d -- %s", error, addinfo ? addinfo : - "NULL"); + yaz_log(LOG_LOG, "[%d] %s %s%s", error, diagbib1_str(error), + addinfo ? " -- " : "", addinfo ? addinfo : "", error); rec->which = Z_Records_NSD; rec->u.nonSurrogateDiagnostic = dr; dr->diagnosticSetId = @@ -886,7 +886,15 @@ static Z_Records *pack_records(association *a, char *setname, int start, { if (!freq.surrogate_flag) { + char s[20]; *pres = Z_PRES_FAILURE; + /* for 'present request out of range', + set addinfo to record position if not set */ + if (freq.errcode == 13 && freq.errstring == 0) + { + sprintf (s, "%d", recno); + freq.errstring = s; + } return diagrec(a, freq.errcode, freq.errstring); } reclist->records[reclist->num_records] = -- 1.7.10.4