Using the new ylog.h everywhere, and fixing what that breaks!
[idzebra-moved-to-github.git] / index / zinfo.c
index 7b16902..d9fce2b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: zinfo.c,v 1.40 2004-08-25 09:23:36 adam Exp $
+/* $Id: zinfo.c,v 1.41 2004-11-19 10:27:05 heikki Exp $
    Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004
    Index Data Aps
 
@@ -198,7 +198,7 @@ void zebraExplain_flush (ZebraExplainInfo zei, void *handle)
 void zebraExplain_close (ZebraExplainInfo zei)
 {
 #if ZINFO_DEBUG
-    yaz_log (LOG_LOG, "zebraExplain_close");
+    yaz_log (YLOG_LOG, "zebraExplain_close");
 #endif
     if (!zei)
        return;
@@ -332,7 +332,7 @@ ZebraExplainInfo zebraExplain_open (
     NMEM nmem = nmem_create ();
 
 #if ZINFO_DEBUG
-    logf (LOG_LOG, "zebraExplain_open wr=%d", writeFlag);
+    yaz_log (YLOG_LOG, "zebraExplain_open wr=%d", writeFlag);
 #endif
     zei = (ZebraExplainInfo) nmem_malloc (nmem, sizeof(*zei));
     zei->write_flag = writeFlag;
@@ -380,7 +380,7 @@ ZebraExplainInfo zebraExplain_open (
        if (!zei->data1_target)
 #endif
        {
-           logf (LOG_FATAL, "Explain schema missing. Check profilePath");
+           yaz_log (YLOG_FATAL, "Explain schema missing. Check profilePath");
            nmem_destroy (zei->nmem);
            return 0;
        }
@@ -462,7 +462,7 @@ ZebraExplainInfo zebraExplain_open (
            np = np->child;
            assert (np && np->which == DATA1N_data);
            zei->runNumber = atoi_zn (np->u.data.data, np->u.data.len);
-            yaz_log (LOG_DEBUG, "read runnumber=" ZINT_FORMAT, zei->runNumber);
+            yaz_log (YLOG_DEBUG, "read runnumber=" ZINT_FORMAT, zei->runNumber);
            *zdip = NULL;
        }
        rec_rm (&trec);
@@ -487,7 +487,7 @@ ZebraExplainInfo zebraExplain_open (
                                 "</></>\n" );
            if (!zei->data1_target)
            {
-               logf (LOG_FATAL, "Explain schema missing. Check profilePath");
+               yaz_log (YLOG_FATAL, "Explain schema missing. Check profilePath");
                nmem_destroy (zei->nmem);
                return 0;
            }
@@ -596,7 +596,7 @@ static void zebraExplain_readAttributeDetails (ZebraExplainInfo zei,
                                     node_use->u.data.len);
        (*zsuip)->info.ordinal = atoi_n (node_ordinal->u.data.data,
                                         node_ordinal->u.data.len);
-       logf (LOG_DEBUG, "set=%d use=%d ordinal=%d",
+       yaz_log (YLOG_DEBUG, "set=%d use=%d ordinal=%d",
              (*zsuip)->info.set, (*zsuip)->info.use, (*zsuip)->info.ordinal);
         zsuip = &(*zsuip)->next;
     }
@@ -703,19 +703,19 @@ int zebraExplain_curDatabase (ZebraExplainInfo zei, const char *database)
     if (!zdi)
         return -1;
 #if ZINFO_DEBUG
-    logf (LOG_LOG, "zebraExplain_curDatabase: %s", database);
+    yaz_log (YLOG_LOG, "zebraExplain_curDatabase: %s", database);
 #endif
     if (zdi->readFlag)
     {
 #if ZINFO_DEBUG
-       logf (LOG_LOG, "zebraExplain_readDatabase: %s", database);
+       yaz_log (YLOG_LOG, "zebraExplain_readDatabase: %s", database);
 #endif
         zebraExplain_readDatabase (zei, zdi);
     }
     if (zdi->attributeDetails->readFlag)
     {
 #if ZINFO_DEBUG
-       logf (LOG_LOG, "zebraExplain_readAttributeDetails: %s", database);
+       yaz_log (YLOG_LOG, "zebraExplain_readAttributeDetails: %s", database);
 #endif
         zebraExplain_readAttributeDetails (zei, zdi->attributeDetails);
     }
@@ -787,7 +787,7 @@ int zebraExplain_newDatabase (ZebraExplainInfo zei, const char *database,
         database_n = database;
 
 #if ZINFO_DEBUG
-    logf (LOG_LOG, "zebraExplain_newDatabase: %s", database);
+    yaz_log (YLOG_LOG, "zebraExplain_newDatabase: %s", database);
 #endif
     assert (zei);
     for (zdi = zei->databaseInfo; zdi; zdi=zdi->next)
@@ -916,7 +916,7 @@ static void zebraExplain_writeCategoryList (ZebraExplainInfo zei,
     node_categoryList = zcl->data1_categoryList;
 
 #if ZINFO_DEBUG
-    logf (LOG_LOG, "zebraExplain_writeCategoryList");
+    yaz_log (YLOG_LOG, "zebraExplain_writeCategoryList");
 #endif
 
     drec = createRecord (zei->records, &sysno);
@@ -970,7 +970,7 @@ static void zebraExplain_writeAttributeDetails (ZebraExplainInfo zei,
     
     zad->dirty = 0;
 #if ZINFO_DEBUG
-    logf (LOG_LOG, "zebraExplain_writeAttributeDetails");    
+    yaz_log (YLOG_LOG, "zebraExplain_writeAttributeDetails");    
 #endif
 
     drec = createRecord (zei->records, &zad->sysno);
@@ -1098,7 +1098,7 @@ static void zebraExplain_writeDatabase (ZebraExplainInfo zei,
 
     zdi->dirty = 0;
 #if ZINFO_DEBUG
-    logf (LOG_LOG, "zebraExplain_writeDatabase %s", zdi->databaseName);
+    yaz_log (YLOG_LOG, "zebraExplain_writeDatabase %s", zdi->databaseName);
 #endif
     drec = createRecord (zei->records, &zdi->sysno);
     assert (zdi->data1_database);
@@ -1182,7 +1182,7 @@ static void zebraExplain_writeAttributeSet (ZebraExplainInfo zei,
        attset = data1_attset_search_id (zei->dh, entp->value);
            
 #if ZINFO_DEBUG
-    logf (LOG_LOG, "zebraExplain_writeAttributeSet %s",
+    yaz_log (YLOG_LOG, "zebraExplain_writeAttributeSet %s",
          attset ? attset->name : "<unknown>");    
 #endif
 
@@ -1459,7 +1459,7 @@ static void att_loadset(void *p, const char *n, const char *name)
 {
     data1_handle dh = (data1_handle) p;
     if (!data1_get_attset (dh, name))
-       logf (LOG_WARN, "Directive attset failed for %s", name);
+       yaz_log (YLOG_WARN, "Directive attset failed for %s", name);
 }
 
 void zebraExplain_loadAttsets (data1_handle dh, Res res)