<arg choice="opt">-T <replaceable>seconds</replaceable></arg>
<arg choice="opt">-u <replaceable>userid</replaceable></arg>
<arg choice="opt">-v <replaceable>level</replaceable></arg>
+ <arg choice="opt">-V</arg>
<arg choice="opt">-X</arg>
<arg choice="req"><replaceable>host</replaceable>:<replaceable>port</replaceable></arg>
</cmdsynopsis>
{<literal>fatal</literal>,<literal>debug</literal>,<literal>warn</literal>,<literal>log</literal>,<literal>malloc</literal>,<literal>all</literal>,<literal>none</literal>}.
</para></listitem>
</varlistentry>
+ <varlistentry><term>-V</term>
+ <listitem><para>
+ Displays yazproxy version and exits with status code 0. Should
+ not be used in conjunction with other options.
+ </para></listitem>
+ </varlistentry>
<varlistentry><term>-X</term>
<listitem><para>
Enables debugging mode for the proxy. When specified, the proxy will
char *prog = argv[0];
int ret;
- while ((ret = options("o:a:Dt:v:c:u:i:m:l:T:p:n:X",
+ while ((ret = options("o:a:Dt:v:c:u:i:m:l:T:p:n:VX",
argv, argc, &arg)) != -2)
{
int err;
case 'v':
yaz_log_init_level (yaz_log_mask_str(arg));
break;
+ case 'V':
+ puts(
+#ifdef VERSION
+ VERSION
+#else
+ "unknown"
+#endif
+ );
+ exit(0);
case 'X':
proxy->set_debug_mode(1);
daemon_flags = YAZ_DAEMON_DEBUG;