Added yazlog utility which calls yaz_log with YLOG_LOG level.
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 9 Nov 2005 09:35:47 +0000 (09:35 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 9 Nov 2005 09:35:47 +0000 (09:35 +0000)
Possibly need to refine this.. Maybe rename to ::log.

SimpleServer.xs
ztest.pl

index 44384f7..579ff91 100644 (file)
@@ -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);
index f3d3025..1376453 100755 (executable)
--- 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",