Log level may be set (option -v)
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 7 Oct 2009 08:30:11 +0000 (10:30 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 7 Oct 2009 08:30:11 +0000 (10:30 +0200)
NEWS
doc/pazpar2.xml
src/pazpar2.c

diff --git a/NEWS b/NEWS
index cab34ce..055ce8a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+Pazpar2 allows YAZ log level to be set (option -v).
+
 --- 1.2.1 2009/10/05
 
 For WS responses Pazpar2 creates XML header. Exception: raw record.
index 92e0eb3..ba88693 100644 (file)
@@ -35,6 +35,7 @@
    <arg choice="opt"><option>-t</option></arg>
    <arg choice="opt"><option>-u <replaceable>uid</replaceable></option></arg>
    <arg choice="opt"><option>-V</option></arg>
+   <arg choice="opt"><option>-v <replaceable>level</replaceable></option></arg>
    <arg choice="opt"><option>-X</option></arg>
    <arg choice="opt"><option>-install</option></arg>
    <arg choice="opt"><option>-remove</option></arg>
    </varlistentry>
 
    <varlistentry>
+    <term><option>-v <replaceable>level</replaceable></option></term>
+    <listitem>
+     <para>
+      Sets log level (YAZ log level system).
+     </para>
+    </listitem>
+   </varlistentry>
+
+   <varlistentry>
     <term><option>-X</option></term>
     <listitem>
      <para>
index 3f5b1cf..589b0ae 100644 (file)
@@ -107,7 +107,7 @@ static int sc_main(
     yaz_log_init_prefix("pazpar2");
     yaz_log_xml_errors(0, YLOG_WARN);
 
-    while ((ret = options("dDf:h:l:p:tu:VX", argv, argc, &arg)) != -2)
+    while ((ret = options("dDf:h:l:p:tu:v:VX", argv, argc, &arg)) != -2)
     {
        switch (ret)
         {
@@ -136,6 +136,9 @@ static int sc_main(
         case 'u':
             uid = arg;
             break;
+        case 'v':
+            yaz_log_init_level(yaz_log_mask_str(arg));
+            break;
         case 'V':
             show_version();
         case 'X':