From 3c9b71a3db56e63476d68ef6b19b5c1a0c47fa75 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 7 May 2013 14:46:54 +0200 Subject: [PATCH] Allow YAZ log level to be given for metaproxy prog --- doc/metaproxy.xml | 8 ++++++++ src/metaproxy_prog.cpp | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/metaproxy.xml b/doc/metaproxy.xml index a41b625..d3a94d7 100644 --- a/doc/metaproxy.xml +++ b/doc/metaproxy.xml @@ -29,6 +29,7 @@ metaproxy + @@ -67,6 +68,13 @@ + -v loglevel + + Specify YAZ log level (all, debug, log) + + + + --config config Specify the configuration. diff --git a/src/metaproxy_prog.cpp b/src/metaproxy_prog.cpp index 6f48973..bfa1b77 100644 --- a/src/metaproxy_prog.cpp +++ b/src/metaproxy_prog.cpp @@ -124,7 +124,7 @@ static int sc_main( set_log_prefix(); - while ((ret = options("c{config}:Dh{help}l:m:p:tu:V{version}w:X", + while ((ret = options("c{config}:Dh{help}l:m:p:tu:v:V{version}w:X", argv, argc, &arg)) != -2) { switch (ret) @@ -139,6 +139,7 @@ static int sc_main( std::cerr << "metaproxy\n" " -h|--help help\n" " -V|--version version\n" + " -v level\n" " -c|--config f config filename\n" " -D daemon and keepalive operation\n" " -l f log file f\n" @@ -170,6 +171,9 @@ static int sc_main( case 'u': uid = arg; break; + case 'v': + yaz_log_init_level(yaz_log_mask_str(arg)); + break; case 'V': std::cout << VERSION; #ifdef VERSION_SHA1 -- 1.7.10.4