From: Adam Dickmeiss Date: Wed, 9 Nov 2005 09:35:47 +0000 (+0000) Subject: Added yazlog utility which calls yaz_log with YLOG_LOG level. X-Git-Tag: release.1.0.3~39 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=b88f2f7ab4c8c08d1a4552c05b52264b7b3e5ee4;p=simpleserver-moved-to-github.git Added yazlog utility which calls yaz_log with YLOG_LOG level. Possibly need to refine this.. Maybe rename to ::log. --- 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",