X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fkinput.c;h=eeb610daf54ac138515c269183edee83d51c4c40;hb=0e56fa84bb4a5985c19a21926e86862c08d84689;hp=06607ffd6cdb6b8628de308e8ac06cf3d40b67b4;hpb=cef013b96c9508d5fd8552e7fd05962029b37e6f;p=idzebra-moved-to-github.git diff --git a/index/kinput.c b/index/kinput.c index 06607ff..eeb610d 100644 --- a/index/kinput.c +++ b/index/kinput.c @@ -1,4 +1,4 @@ -/* $Id: kinput.c,v 1.62 2004-09-15 08:13:51 adam Exp $ +/* $Id: kinput.c,v 1.63 2004-11-19 10:26:57 heikki Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -82,21 +82,21 @@ void key_file_chunk_read (struct key_file *f) f->buf_size = 0; if (fd == -1) { - logf (LOG_WARN|LOG_ERRNO, "cannot open %s", fname); + yaz_log (YLOG_WARN|YLOG_ERRNO, "cannot open %s", fname); return ; } if (!f->length) { if ((f->length = lseek (fd, 0L, SEEK_END)) == (off_t) -1) { - logf (LOG_WARN|LOG_ERRNO, "cannot seek %s", fname); + yaz_log (YLOG_WARN|YLOG_ERRNO, "cannot seek %s", fname); close (fd); return ; } } if (lseek (fd, f->offset, SEEK_SET) == -1) { - logf (LOG_WARN|LOG_ERRNO, "cannot seek %s", fname); + yaz_log (YLOG_WARN|YLOG_ERRNO, "cannot seek %s", fname); close(fd); return ; } @@ -109,7 +109,7 @@ void key_file_chunk_read (struct key_file *f) } if (r == -1) { - logf (LOG_WARN|LOG_ERRNO, "read of %s", fname); + yaz_log (YLOG_WARN|YLOG_ERRNO, "read of %s", fname); close (fd); return; } @@ -288,8 +288,8 @@ struct heap_info *key_heap_init_buff ( ZebraHandle zh, void key_heap_destroy (struct heap_info *hi, int nkeys) { int i; - yaz_log (LOG_DEBUG, "key_heap_destroy"); - yaz_log (LOG_DEBUG, "key_heap_destroy nk=%d",nkeys); + yaz_log (YLOG_DEBUG, "key_heap_destroy"); + yaz_log (YLOG_DEBUG, "key_heap_destroy nk=%d",nkeys); if (!hi->zh) for (i = 0; i<=nkeys; i++) xfree (hi->info.buf[i]); @@ -363,7 +363,7 @@ static int heap_read_one_raw (struct heap_info *hi, char *name, char *key) return 0; --(zh->reg->ptr_i); cp=(zh->reg->key_buf)[zh->reg->ptr_top - ptr_i]; - logf (LOG_DEBUG, " raw: i=%ld top=%ld cp=%p", (long) ptr_i, + yaz_log (YLOG_DEBUG, " raw: i=%ld top=%ld cp=%p", (long) ptr_i, (long) zh->reg->ptr_top, cp); strcpy(name, cp); memcpy(key, cp+strlen(name)+1, KEY_SIZE); @@ -603,7 +603,7 @@ static void print_dict_item (ZebraMaps zm, const char *s) *to++ = *res++; } *to = '\0'; - yaz_log (LOG_LOG, "%s", keybuf); + yaz_log (YLOG_LOG, "%s", keybuf); } #endif @@ -701,7 +701,7 @@ int heap_inps (struct heap_info *hi) } else { - logf (LOG_FATAL, "isams doesn't support this kind of update"); + yaz_log (YLOG_FATAL, "isams doesn't support this kind of update"); break; } } @@ -731,10 +731,10 @@ void progressFunc (struct key_file *keyp, void *info) remaining = (time_t) ((now - p->startTime)* ((double) p->totalBytes/p->totalOffset - 1.0)); if (remaining <= 130) - logf (LOG_LOG, "Merge %2.1f%% completed; %ld seconds remaining", + yaz_log (YLOG_LOG, "Merge %2.1f%% completed; %ld seconds remaining", (100.0*p->totalOffset) / p->totalBytes, (long) remaining); else - logf (LOG_LOG, "Merge %2.1f%% completed; %ld minutes remaining", + yaz_log (YLOG_LOG, "Merge %2.1f%% completed; %ld minutes remaining", (100.0*p->totalOffset) / p->totalBytes, (long) remaining/60); } p->totalOffset += keyp->buf_size; @@ -754,7 +754,7 @@ void zebra_index_merge (ZebraHandle zh) int nkeys = zh->reg->key_file_no; int usefile; - logf (LOG_DEBUG, " index_merge called with nk=%d b=%p", + yaz_log (YLOG_DEBUG, " index_merge called with nk=%d b=%p", nkeys, zh->reg->key_buf); if ( (nkeys==0) && (zh->reg->key_buf==0) ) return; /* nothing to merge - probably flush after end-trans */ @@ -822,11 +822,11 @@ void zebra_index_merge (ZebraHandle zh) } if (hi->no_iterations) { /* do not log if nothing happened */ - logf (LOG_LOG, "Iterations . . .%7d", hi->no_iterations); - logf (LOG_LOG, "Distinct words .%7d", hi->no_diffs); - logf (LOG_LOG, "Updates. . . . .%7d", hi->no_updates); - logf (LOG_LOG, "Deletions. . . .%7d", hi->no_deletions); - logf (LOG_LOG, "Insertions . . .%7d", hi->no_insertions); + yaz_log (YLOG_LOG, "Iterations . . .%7d", hi->no_iterations); + yaz_log (YLOG_LOG, "Distinct words .%7d", hi->no_diffs); + yaz_log (YLOG_LOG, "Updates. . . . .%7d", hi->no_updates); + yaz_log (YLOG_LOG, "Deletions. . . .%7d", hi->no_deletions); + yaz_log (YLOG_LOG, "Insertions . . .%7d", hi->no_insertions); } zh->reg->key_file_no = 0;