Only warn about empty records within file verbose limit
[idzebra-moved-to-github.git] / index / extract.c
index 2e6654d..8b4ae22 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: extract.c,v 1.163 2004-09-27 10:44:49 adam Exp $
+/* $Id: extract.c,v 1.165 2004-10-04 09:27:48 adam Exp $
    Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
    Index Data Aps
 
@@ -494,8 +494,9 @@ static int file_extract_record(ZebraHandle zh,
             if (!zh->m_flag_rw)
                 return 1;
            
-           logf (LOG_WARN, "empty %s %s " PRINTF_OFF_T, zh->m_record_type,
-                 fname, recordOffset);
+           if (zh->records_processed < zh->m_file_verbose_limit)
+               logf (LOG_WARN, "empty %s %s " PRINTF_OFF_T, zh->m_record_type,
+                   fname, recordOffset);
             return 1;
         }
     }
@@ -1542,7 +1543,7 @@ static void extract_add_complete_field (RecWord *p)
     int i = 0, remain = p->length;
     int first; /* first position */
 
-yaz_log(LOG_DEBUG, "Complete field, w='%s'", p->string);
+yaz_log(LOG_DEBUG, "Complete field, w='%.*s'", p->length, p->string);
 
     if (remain > 0)
        map = zebra_maps_input (p->zebra_maps, p->reg_type, &b, remain, 1);