From: Adam Dickmeiss Date: Thu, 29 Jan 1998 13:40:11 +0000 (+0000) Subject: Better logging for scan service. X-Git-Tag: ZEBRA.1.0~247 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=0c2c147590a99fba778d04dc3e695587b56f6961 Better logging for scan service. --- diff --git a/index/zlogs.c b/index/zlogs.c index 7532c80..7c820ba 100644 --- a/index/zlogs.c +++ b/index/zlogs.c @@ -1,10 +1,13 @@ /* - * Copyright (C) 1994-1995, Index Data I/S + * Copyright (C) 1995-1998, Index Data I/S * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * * $Log: zlogs.c,v $ - * Revision 1.6 1997-09-29 09:06:41 adam + * Revision 1.7 1998-01-29 13:40:11 adam + * Better logging for scan service. + * + * Revision 1.6 1997/09/29 09:06:41 adam * Removed static var to make this module thread safe. * * Revision 1.5 1997/04/30 08:56:07 quinn @@ -307,3 +310,16 @@ void zlog_rpn (Z_RPNQuery *rpn) logf (LOG_LOG, "RPN query. Type: %s", attrset->desc); zlog_structure (rpn->RPNStructure, 0, ast); } + +void zlog_scan (Z_AttributesPlusTerm *zapt, oid_value ast) +{ + int level = 0; + if (zapt->term->which == Z_Term_general) + { + logf (LOG_LOG, "%*.s term '%.*s' (general)", level, "", + zapt->term->u.general->len, zapt->term->u.general->buf); + } + else + logf (LOG_LOG, "%*.s term (not general)", level, ""); + zlog_attributes (zapt, level+2, ast); +} diff --git a/index/zrpn.c b/index/zrpn.c index eeee1b7..fc4dcca 100644 --- a/index/zrpn.c +++ b/index/zrpn.c @@ -1,10 +1,13 @@ /* - * Copyright (C) 1994-1998, Index Data I/S + * Copyright (C) 1995-1998, Index Data I/S * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * * $Log: zrpn.c,v $ - * Revision 1.72 1998-01-07 13:53:41 adam + * Revision 1.73 1998-01-29 13:40:11 adam + * Better logging for scan service. + * + * Revision 1.72 1998/01/07 13:53:41 adam * Queries using simple ranked operands returns right number of hits. * * Revision 1.71 1997/12/18 10:54:24 adam @@ -1526,14 +1529,14 @@ int rpn_scan (ZServerInfo *zi, Z_AttributesPlusTerm *zapt, char *search_type = NULL; int complete_flag; - logf (LOG_DEBUG, "scan, position = %d, num = %d", pos, num); - if (attributeset == VAL_NONE) attributeset = VAL_BIB1; + + zlog_scan (zapt, attributeset); + logf (LOG_DEBUG, "position = %d, num = %d", pos, num); attr_init (&use, zapt, 1); use_value = attr_find (&use, &attributeset); - logf (LOG_DEBUG, "use value %d", use_value); if (zebra_maps_attr (zi->zebra_maps, zapt, ®_type, &search_type, &complete_flag)) diff --git a/index/zserver.h b/index/zserver.h index 2b25cdf..13e8901 100644 --- a/index/zserver.h +++ b/index/zserver.h @@ -1,10 +1,13 @@ /* - * Copyright (C) 1994-1997, Index Data I/S + * Copyright (C) 1994-1998, Index Data I/S * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * * $Log: zserver.h,v $ - * Revision 1.27 1997-10-27 14:33:06 adam + * Revision 1.28 1998-01-29 13:40:11 adam + * Better logging for scan service. + * + * Revision 1.27 1997/10/27 14:33:06 adam * Moved towards generic character mapping depending on "structure" * field in abstract syntax file. Fixed a few memory leaks. Fixed * bug with negative integers when doing searches with relational @@ -175,6 +178,7 @@ ZServerSetSysno *resultSetSysnoGet (ZServerInfo *zi, const char *name, int num, int *positions); void resultSetSysnoDel (ZServerInfo *zi, ZServerSetSysno *records, int num); void zlog_rpn (Z_RPNQuery *rpn); +void zlog_scan (Z_AttributesPlusTerm *zapt, oid_value ast); int zebra_server_lock_init (ZServerInfo *zi); int zebra_server_lock_destroy (ZServerInfo *zi);