Merge remote-tracking branch 'origin/master' into rewrite-filter
authorJakub Skoczen <jakub@indexdata.dk>
Tue, 7 May 2013 15:25:00 +0000 (17:25 +0200)
committerJakub Skoczen <jakub@indexdata.dk>
Tue, 7 May 2013 15:25:00 +0000 (17:25 +0200)
doc/metaproxy.xml
example-module/Makefile
metaproxy-config.in
src/metaproxy_prog.cpp

index a41b625..d3a94d7 100644 (file)
@@ -29,6 +29,7 @@
    <command>metaproxy</command>
    <arg choice="opt"><option>--help</option></arg>
    <arg choice="opt"><option>--version</option></arg>
+   <arg choice="opt"><option>-v <replaceable>loglevel</replaceable></option></arg>
    <arg choice="opt"><option>--config <replaceable>config</replaceable></option></arg>
    <arg choice="opt"><option>-D</option></arg>
    <arg choice="opt"><option>-l <replaceable>logfile</replaceable></option></arg>
    </varlistentry>
 
    <varlistentry>
+    <term>-v <replaceable>loglevel</replaceable></term>
+    <listitem><para>
+     Specify YAZ log level (all, debug, log)
+    </para></listitem>
+   </varlistentry>
+
+   <varlistentry>
     <term>--config <replaceable>config</replaceable></term>
     <listitem><para>
       Specify the configuration.
index 63810a2..a352aed 100644 (file)
@@ -1,10 +1,12 @@
-CONFIG=../../yazpp/yazpp-config
+CONFIG=../metaproxy-config
 SO=metaproxy_filter_myfilter.so
 
 all: $(SO)
 
 $(SO): filter_myfilter.cpp
-       $(CXX) -shared `$(CONFIG) --cflags` -fPIC -I ../src $< -o $(SO) ../src/.libs/libmetaproxy.so -ldl
+       echo $(LIBS)
+       $(CXX) -shared `$(CONFIG) --cflags` -fPIC -I ../src $< \
+               -o $(SO) `$(CONFIG) --libs`
 
 clean:
        rm -f *.so
index d9e7f03..7d90136 100644 (file)
@@ -12,7 +12,7 @@ echo_lalibs=no
 src_root=@abs_top_srcdir@
 build_root=@abs_top_builddir@
 
-libs="@YAZPPLIB@ @LIBS@"
+libs="@BOOST_LIB@ @BOOST_REGEX_LIB@ @BOOST_THREAD_LIB@ @YAZPPLIB@ @LIBS@"
 lalibs="@YAZPPLALIB@ @LIBS@"
 VERSION=@VERSION@
 
index 6f48973..bfa1b77 100644 (file)
@@ -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