pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/39134?usp=email )
Change subject: bankd: Add -T and -e cmdline params ...................................................................... bankd: Add -T and -e cmdline params Change-Id: I2c33c667be77578699f4a5fb70c8b74c67f6e2cf --- M doc/manuals/chapters/remsim-bankd.adoc M src/bankd/bankd_main.c 2 files changed, 21 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/doc/manuals/chapters/remsim-bankd.adoc b/doc/manuals/chapters/remsim-bankd.adoc index e87de52..b9db3d7 100644 --- a/doc/manuals/chapters/remsim-bankd.adoc +++ b/doc/manuals/chapters/remsim-bankd.adoc @@ -99,6 +99,16 @@ without knowledge of each other, and either of them might modify the card state (such as the currently selected file, validated PIN, etc.) in a way not expected by the other application. +*-g, --gsmtap-ip A.B.C.D*:: + Enable GSMTAP and send APDU traces to given IP. +*-G, --gsmtap-slot <0-1023>*:: + Limit tracing to given bank slot, only (default: all slots). +*-L, --disable-color*:: + Disable colors for logging to stderr. +*-T, --timestamp*:: + Prefix every log line with a timestamp. +*-e, --log-level number*:: + Set a global loglevel for all logging. ==== Examples diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c index e9e4889..14c676d 100644 --- a/src/bankd/bankd_main.c +++ b/src/bankd/bankd_main.c @@ -303,6 +303,8 @@ " -g --gsmtap-ip A.B.C.D Enable GSMTAP and send APDU traces to given IP\n" " -G --gsmtap-slot <0-1023> Limit tracing to given bank slot, only (default: all slots)\n" " -L --disable-color Disable colors for logging to stderr\n" +" -T --timestamp Prefix every log line with a timestamp\n" +" -e --log-level number Set a global loglevel.\n" ); } @@ -328,10 +330,12 @@ { "gsmtap-ip", 1, 0, 'g' }, { "gsmtap-slot", 1, 0, 'G' }, { "disable-color", 0, 0, 'L' }, + { "timestamp", 0, 0, 'T' }, + { "log-level", 1, 0, 'e' }, { 0, 0, 0, 0 } }; - c = getopt_long(argc, argv, "hVd:i:p:b:n:N:I:P:sg:G:L", long_options, &option_index); + c = getopt_long(argc, argv, "hVd:i:p:b:n:N:I:P:sg:G:LTe:", long_options, &option_index); if (c == -1) break; @@ -380,6 +384,12 @@ case 'L': log_set_use_color(osmo_stderr_target, 0); break; + case 'T': + log_set_print_timestamp(osmo_stderr_target, 1); + break; + case 'e': + log_set_log_level(osmo_stderr_target, atoi(optarg)); + break; } } } -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/39134?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I2c33c667be77578699f4a5fb70c8b74c67f6e2cf Gerrit-Change-Number: 39134 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pes...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <lafo...@osmocom.org> Gerrit-Reviewer: osmith <osm...@sysmocom.de> Gerrit-Reviewer: pespin <pes...@sysmocom.de>