diff --git a/README.md b/README.md index ebf490f59a5ab4ac6c8a154785443cff0ed28310..cea5fab8b9a8747cdba27356d70d8187ed49de7f 100644 --- a/README.md +++ b/README.md @@ -179,7 +179,7 @@ Flags: (default 1) --sendDelay uint The delay between sending the messages in ms (default 500) - --sendid uint Use precanned user id (must be between 1 and + --sendid uiverboseRoundTrackingnt Use precanned user id (must be between 1 and 40, inclusive) --slowPolling bool Enables polling for all network updates and RSA signed rounds. Defaults to true (filtered updates with ECC signed rounds) if not set @@ -190,6 +190,9 @@ Flags: --unsafe-channel-creation Turns off the user identity authenticated channel check, automatically approving authenticated channels + --verboseRoundTracking Verbose round tracking, keeps track and prints + all rounds the client was aware of while running. + Defaults to false if not set. -v, --logLevel uint Level of debugging to print (0 = info, 1 = debug, >1 = trace). (Default info) --waitTimeout uint The number of seconds to wait for messages to diff --git a/cmd/root.go b/cmd/root.go index 853b5a48c1e43932e7bac5b4e0b1dd6e2f3042fe..8150d5f36f2feb509ba72c22fd88b0cf3c545871 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -387,7 +387,7 @@ func createClient() *api.Client { netParams.ForceHistoricalRounds = viper.GetBool("forceHistoricalRounds") netParams.FastPolling = !viper.GetBool("slowPolling") netParams.ForceMessagePickupRetry = viper.GetBool("forceMessagePickupRetry") - netParams.VerboseRoundTracking = logLevel > 0 + netParams.VerboseRoundTracking = viper.GetBool("verboseRoundTracking") client, err := api.OpenClient(storeDir, []byte(pass), netParams) if err != nil { @@ -415,7 +415,7 @@ func initClient() *api.Client { jww.INFO.Printf("Setting Uncheck Round Period to %v", period) netParams.UncheckRoundPeriod = period } - netParams.VerboseRoundTracking = viper.GetUint("logLevel") > 0 + netParams.VerboseRoundTracking = viper.GetBool("verboseRoundTracking") //load the client client, err := api.Login(storeDir, []byte(pass), netParams) @@ -731,6 +731,11 @@ func init() { "Verbose mode for debugging") viper.BindPFlag("logLevel", rootCmd.PersistentFlags().Lookup("logLevel")) + rootCmd.PersistentFlags().Bool("verboseRoundTracking", false, + "Verbose round tracking, keeps track and prints all rounds the " + + "client was aware of while running. Defaults to false if not set.") + viper.BindPFlag("verboseRoundTracking", rootCmd.PersistentFlags().Lookup("verboseRoundTracking")) + rootCmd.PersistentFlags().StringP("session", "s", "", "Sets the initial storage directory for "+ "client session data")