pespin has uploaded this change for review. ( 
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 src/bankd/bankd_main.c
1 file changed, 11 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/34/39134/1

diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c
index a7e02b3..d96d49c 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: newchange
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I2c33c667be77578699f4a5fb70c8b74c67f6e2cf
Gerrit-Change-Number: 39134
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to