X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fmain.c;h=47838a14f4664797da542e36d6e288358a64b376;hb=1e58ebd4607490d810c7396a4e87eb70d9528166;hp=392a7d4c69ace0d14b3d337f96465115b4981505;hpb=8ee402d79e37344b08c2b54ad45b50e8327a6c03;p=idzebra-moved-to-github.git diff --git a/index/main.c b/index/main.c index 392a7d4..47838a1 100644 --- a/index/main.c +++ b/index/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.115 2004-09-27 10:44:49 adam Exp $ +/* $Id: main.c,v 1.119 2004-12-13 20:51:30 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -20,7 +20,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #include #include #include @@ -35,7 +34,8 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #endif -#include +#include +#include #include char *prog; @@ -122,12 +122,12 @@ int main (int argc, char **argv) if (!zs) { const char *config = configName ? configName : "zebra.cfg"; - logf (LOG_LOG, "Zebra version %s %s", + yaz_log (YLOG_LOG, "Zebra version %s %s", ZEBRAVER, ZEBRADATE); zs = zebra_start_res (config, 0, res); if (!zs) { - yaz_log (LOG_FATAL, "Cannot read config %s", config); + yaz_log (YLOG_FATAL, "Cannot read config %s", config); exit (1); } zh = zebra_open (zs); @@ -136,7 +136,7 @@ int main (int argc, char **argv) if (zebra_select_database (zh, database)) { - logf(LOG_FATAL, "Could not select database %s errCode=%d", + yaz_log(YLOG_FATAL, "Could not select database %s errCode=%d", database, zebra_errCode(zh) ); exit (1); } @@ -188,7 +188,7 @@ int main (int argc, char **argv) } else { - logf (LOG_FATAL, "unknown command: %s", arg); + yaz_log (YLOG_FATAL, "unknown command: %s", arg); exit (1); } } @@ -262,7 +262,7 @@ int main (int argc, char **argv) else if (ret == 'L') res_set(res, "followLinks", "0"); else - logf (LOG_WARN, "unknown option '-%s'", arg); + yaz_log (YLOG_WARN, "unknown option '-%s'", arg); } /* while arg */ if (trans_started) @@ -277,7 +277,7 @@ int main (int argc, char **argv) usec = (end_time.tv_sec - start_time.tv_sec) * 1000000.0 + end_time.tv_usec - start_time.tv_usec; times(&tms2); - yaz_log (LOG_LOG, "zebraidx times: %5.2f %5.2f %5.2f", + yaz_log (YLOG_LOG, "zebraidx times: %5.2f %5.2f %5.2f", usec / 1000000, (double) (tms2.tms_utime - tms1.tms_utime)/100, (double) (tms2.tms_stime - tms1.tms_stime)/100);