From d9849e03a9313647aa81846cf9cb05a06394e9ea Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 17 Apr 2014 08:52:54 +0200 Subject: [PATCH] zoomsh: offer option -a apdulog As we're used to from yaz-client and GFS based servers. --- doc/zoomsh-man.xml | 9 ++++++++- zoom/zoomsh.c | 7 +++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/zoomsh-man.xml b/doc/zoomsh-man.xml index aafe716..75c6829 100644 --- a/doc/zoomsh-man.xml +++ b/doc/zoomsh-man.xml @@ -29,6 +29,7 @@ zoomsh + commands @@ -51,6 +52,12 @@ OPTIONS + -a apdufile + + Logs protocol packages into apdufile (APDU log). + + + -e Makes zoomsh stop processing commands as soon as an error occur. @@ -60,7 +67,7 @@ -v loglevel - Sets YAZ log level. + Sets YAZ log level to loglevel. diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index e49487b..fa4c0f8 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -957,7 +957,7 @@ static int zoomsh(int argc, char **argv) { int mask; char *arg = 0; - int option_ret = options("ev:", argv, argc, &arg); + int option_ret = options("a:ev:", argv, argc, &arg); const char *bp = arg; switch (option_ret) { @@ -970,6 +970,9 @@ static int zoomsh(int argc, char **argv) case YAZ_OPTIONS_EOF: res = shell(&sh, exit_on_error); break; + case 'a': + ZOOM_options_set(sh.options, "apdufile", arg); + break; case 'e': exit_on_error = 1; break; @@ -978,7 +981,7 @@ static int zoomsh(int argc, char **argv) yaz_log_init_level(mask); break; default: - fprintf(stderr, "zoomsh: [-e] [-v] [commands]\n"); + fprintf(stderr, "zoomsh: [-a apdulog] [-e] [-v level] [commands]\n"); res = 1; } } -- 1.7.10.4