From b88f2f7ab4c8c08d1a4552c05b52264b7b3e5ee4 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 9 Nov 2005 09:35:47 +0000 Subject: [PATCH] Added yazlog utility which calls yaz_log with YLOG_LOG level. Possibly need to refine this.. Maybe rename to ::log. --- SimpleServer.xs | 10 +++++++++- ztest.pl | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/SimpleServer.xs b/SimpleServer.xs index 44384f7..579ff91 100644 --- a/SimpleServer.xs +++ b/SimpleServer.xs @@ -1,5 +1,5 @@ /* - * $Id: SimpleServer.xs,v 1.34 2004-09-03 13:27:19 mike Exp $ + * $Id: SimpleServer.xs,v 1.35 2005-11-09 09:35:47 adam Exp $ * ---------------------------------------------------------------------- * * Copyright (c) 2000-2004, Index Data. @@ -1441,3 +1441,11 @@ ScanPartial() RETVAL +void +yazlog(arg) + SV *arg + CODE: + STRLEN len; + char *ptr; + ptr = SvPV(arg, len); + yaz_log(YLOG_LOG, "%.*s", len, ptr); diff --git a/ztest.pl b/ztest.pl index f3d3025..1376453 100755 --- a/ztest.pl +++ b/ztest.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -## $Id: ztest.pl,v 1.13 2004-05-28 20:27:16 sondberg Exp $ +## $Id: ztest.pl,v 1.14 2005-11-09 09:35:47 adam Exp $ ## ------------------------------------------------------------------ ## ## Copyright (c) 2000-2004, Index Data. @@ -148,6 +148,7 @@ sub my_fetch_handler { } } +Net::Z3950::SimpleServer::yazlog("hello"); my $handler = new Net::Z3950::SimpleServer( INIT => "main::my_init_handler", -- 1.7.10.4