From: Adam Dickmeiss Date: Tue, 12 Mar 2013 18:05:40 +0000 (+0100) Subject: Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/metaproxy X-Git-Tag: v1.3.54~6^2 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=6e9a17fa34cc226ffcb870b37229af25beefbc35;hp=4a2b79f8d5e74dcfaaf1cf47829ddb1f76237c7d;p=metaproxy-moved-to-github.git Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/metaproxy --- diff --git a/doc/log.xml b/doc/log.xml index 7c1f191..80708cd 100644 --- a/doc/log.xml +++ b/doc/log.xml @@ -36,10 +36,24 @@ + time-format + + + Date+time format if log is written to a custom file (see filename configuration, below), using the format of + + strftime(3). + + + Use option -m in invocation of Metaproxy command to set format if yaz_log is used (no filename given). + + + filename - Specifies a name of log file. + Specifies a name of log file. If this is omitted, logging is performed + using the log system of YAZ (yaz_log). diff --git a/doc/metaproxy-config.xml b/doc/metaproxy-config.xml index cd72986..ed5fefd 100644 --- a/doc/metaproxy-config.xml +++ b/doc/metaproxy-config.xml @@ -6,7 +6,7 @@ %idcommon; ]> - + Metaproxy &version; diff --git a/doc/metaproxy.xml b/doc/metaproxy.xml index 622f215..a41b625 100644 --- a/doc/metaproxy.xml +++ b/doc/metaproxy.xml @@ -32,6 +32,7 @@ + @@ -87,6 +88,18 @@ + -m timeformat + + Sets the format of time-stamps for all logging performed via yaz_log. + Refer to + + strftime(3) + man page for the format. + + + + -p pidfile Specifies file which holds PID after startup. diff --git a/src/metaproxy_prog.cpp b/src/metaproxy_prog.cpp index c6d582f..6f48973 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:p:tu:V{version}w:X", + while ((ret = options("c{config}:Dh{help}l:m:p:tu:V{version}w:X", argv, argc, &arg)) != -2) { switch (ret) @@ -142,6 +142,7 @@ static int sc_main( " -c|--config f config filename\n" " -D daemon and keepalive operation\n" " -l f log file f\n" + " -m logformat log time format (strftime)\n" " -p f pid file f\n" " -t test configuration\n" " -u id change uid to id\n" @@ -157,6 +158,9 @@ static int sc_main( case 'l': yaz_log_init_file(arg); break; + case 'm': + yaz_log_time_format(arg); + break; case 'p': pidfile = arg; break;