From 7d195990cef76c990c4e1739855b67c6face7e4c Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 7 Oct 2009 10:30:11 +0200 Subject: [PATCH] Log level may be set (option -v) --- NEWS | 2 ++ doc/pazpar2.xml | 10 ++++++++++ src/pazpar2.c | 5 ++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index cab34ce..055ce8a 100644 --- 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. diff --git a/doc/pazpar2.xml b/doc/pazpar2.xml index 92e0eb3..ba88693 100644 --- a/doc/pazpar2.xml +++ b/doc/pazpar2.xml @@ -35,6 +35,7 @@ + @@ -151,6 +152,15 @@ + + + + Sets log level (YAZ log level system). + + + + + diff --git a/src/pazpar2.c b/src/pazpar2.c index 3f5b1cf..589b0ae 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -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': -- 1.7.10.4