From a4672c6ad0168d8c39b6806e33b90cba4151ac0d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 5 Sep 2000 14:04:05 +0000 Subject: [PATCH] Updates for prefix 'yaz_' for YAZ log functions. --- dfa/grepper.c | 7 +++++-- dict/dictext.c | 7 +++++-- dict/dicttest.c | 7 +++++-- index/apitest.c | 2 +- index/extract.c | 7 +++++-- index/lockidx.c | 9 ++++++--- index/main.c | 9 ++++++--- index/zserver.c | 9 ++++++--- 8 files changed, 39 insertions(+), 18 deletions(-) diff --git a/dfa/grepper.c b/dfa/grepper.c index d7a858e..baa9be7 100644 --- a/dfa/grepper.c +++ b/dfa/grepper.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: grepper.c,v $ - * Revision 1.8 1999-02-02 14:50:07 adam + * Revision 1.9 2000-09-05 14:04:05 adam + * Updates for prefix 'yaz_' for YAZ log functions. + * + * Revision 1.8 1999/02/02 14:50:07 adam * Updated WIN32 code specific sections. Changed header. * * Revision 1.7 1996/10/29 13:57:24 adam @@ -389,7 +392,7 @@ int main (int argc, char **argv) } else if (ret == 'v') { - log_init (log_mask_str(arg), prog, NULL); + yaz_log_init (yaz_log_mask_str(arg), prog, NULL); } else if (ret == 's') { diff --git a/dict/dictext.c b/dict/dictext.c index 09c4198..8f49431 100644 --- a/dict/dictext.c +++ b/dict/dictext.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: dictext.c,v $ - * Revision 1.7 1999-02-02 14:50:18 adam + * Revision 1.8 2000-09-05 14:04:05 adam + * Updates for prefix 'yaz_' for YAZ log functions. + * + * Revision 1.7 1999/02/02 14:50:18 adam * Updated WIN32 code specific sections. Changed header. * * Revision 1.6 1996/10/29 14:00:02 adam @@ -61,7 +64,7 @@ int main (int argc, char **argv) } else if (ret == 'v') { - log_init (log_mask_str(arg), prog, NULL); + yaz_log_init (yaz_log_mask_str(arg), prog, NULL); } else if (ret == 'h') { diff --git a/dict/dicttest.c b/dict/dicttest.c index 5538b49..28d971c 100644 --- a/dict/dicttest.c +++ b/dict/dicttest.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: dicttest.c,v $ - * Revision 1.23 2000-07-07 12:49:20 adam + * Revision 1.24 2000-09-05 14:04:05 adam + * Updates for prefix 'yaz_' for YAZ log functions. + * + * Revision 1.23 2000/07/07 12:49:20 adam * Optimized resultSetInsert{Rank,Sort}. * * Revision 1.22 1999/02/02 14:50:19 adam @@ -193,7 +196,7 @@ int main (int argc, char **argv) } else if (ret == 'v') { - log_init (log_mask_str(arg), prog, NULL); + yaz_log_init (yaz_log_mask_str(arg), prog, NULL); } else { diff --git a/index/apitest.c b/index/apitest.c index 69574e4..3047044 100644 --- a/index/apitest.c +++ b/index/apitest.c @@ -109,7 +109,7 @@ int main (int argc, char **argv) nmem_init (); - log_init_file("apitest.log"); + yaz_log_init_file("apitest.log"); odr_input = odr_createmem (ODR_DECODE); odr_output = odr_createmem (ODR_ENCODE); diff --git a/index/extract.c b/index/extract.c index 269c21f..ca0dc46 100644 --- a/index/extract.c +++ b/index/extract.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: extract.c,v $ - * Revision 1.103 2000-05-18 12:01:36 adam + * Revision 1.104 2000-09-05 14:04:05 adam + * Updates for prefix 'yaz_' for YAZ log functions. + * + * Revision 1.103 2000/05/18 12:01:36 adam * System call times(2) used again. More 64-bit fixes. * * Revision 1.102 2000/05/15 15:32:33 adam @@ -1277,7 +1280,7 @@ struct recordLogInfo { static void recordLogPreamble (int level, const char *msg, void *info) { struct recordLogInfo *p = (struct recordLogInfo *) info; - FILE *outf = log_file (); + FILE *outf = yaz_log_file (); if (level & LOG_LOG) return ; diff --git a/index/lockidx.c b/index/lockidx.c index 7adf2eb..20ece01 100644 --- a/index/lockidx.c +++ b/index/lockidx.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: lockidx.c,v $ - * Revision 1.18 2000-02-24 11:00:07 adam + * Revision 1.19 2000-09-05 14:04:05 adam + * Updates for prefix 'yaz_' for YAZ log functions. + * + * Revision 1.18 2000/02/24 11:00:07 adam * Fixed bug: indexer would run forever when lock dir was non-existant. * * Revision 1.17 1999/12/08 15:03:11 adam @@ -172,12 +175,12 @@ void zebraIndexUnlock (void) { char path[1024]; - zebra_lock_destroy (server_lock_main); - server_lock_main = 0; zebra_lock_prefix (common_resource, path); strcat (path, FNAME_MAIN_LOCK); if (unlink (path) && errno != ENOENT) logf (LOG_WARN|LOG_ERRNO, "unlink %s failed", path); + zebra_lock_destroy (server_lock_main); + server_lock_main = 0; } int zebraIndexLock (BFiles bfs, int commitNow, const char *rval) diff --git a/index/main.c b/index/main.c index 79104a8..b6e99d9 100644 --- a/index/main.c +++ b/index/main.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: main.c,v $ - * Revision 1.76 2000-03-20 19:08:36 adam + * Revision 1.77 2000-09-05 14:04:05 adam + * Updates for prefix 'yaz_' for YAZ log functions. + * + * Revision 1.76 2000/03/20 19:08:36 adam * Added remote record import using Z39.50 extended services and Segment * Requests. * @@ -600,9 +603,9 @@ int main (int argc, char **argv) #endif } else if (ret == 'v') - log_init_level (log_mask_str(arg)); + yaz_log_init_level (yaz_log_mask_str(arg)); else if (ret == 'l') - log_init_file (arg); + yaz_log_init_file (arg); else if (ret == 'm') mem_max = 1024*1024*atoi(arg); else if (ret == 'd') diff --git a/index/zserver.c b/index/zserver.c index 12f4e5e..0509ecb 100644 --- a/index/zserver.c +++ b/index/zserver.c @@ -3,7 +3,10 @@ * All rights reserved. * * $Log: zserver.c,v $ - * Revision 1.79 2000-05-09 10:56:50 adam + * Revision 1.80 2000-09-05 14:04:05 adam + * Updates for prefix 'yaz_' for YAZ log functions. + * + * Revision 1.79 2000/05/09 10:56:50 adam * Added call to xmalloc/nmem debugging functions. * * Revision 1.78 2000/04/05 09:49:35 adam @@ -641,7 +644,7 @@ int bend_esrequest (void *handle, bend_esrequest_rr *rr) odr_errmsg(odr_geterror(rr->decode)), odr_offset(rr->decode)); yaz_log(LOG_LOG, "PDU dump:"); - odr_dumpBER(log_file(), + odr_dumpBER(yaz_log_file(), r->u.single_ASN1_type->buf, r->u.single_ASN1_type->len); } @@ -666,7 +669,7 @@ int bend_esrequest (void *handle, bend_esrequest_rr *rr) odr_errmsg(odr_geterror(rr->decode)), odr_offset(rr->decode)); yaz_log(LOG_LOG, "PDU dump:"); - odr_dumpBER(log_file(), + odr_dumpBER(yaz_log_file(), r->u.single_ASN1_type->buf, r->u.single_ASN1_type->len); } -- 1.7.10.4