Closed NIC619 closed 5 years ago
Should fix -loglevel=
flag to throw if an invalid flag is inputted.
sharding-p2p-poc -client -rpcport=7788 addpeer 10.1.0.6 5566 1 -loglevel=VERBOSE
16:12:13.088 CRITI sharding-p: Client: usage: addpeer ip port seed cli.go:17
sharding-p2p-poc -client -rpcport=7788 addpeer 10.1.0.6 5566 1 -loglevel=ASDFG
16:12:23.108 CRITI sharding-p: Client: usage: addpeer ip port seed cli.go:17
These two give the same response.
Should probably give a response like:
"invalid flag passed, please input a valid flag value."
and then give them the cli help command
-loglevel string
setting log level, e.g., DEBUG, WARNING, INFO, ERROR, CRITICAL (default "INFO")
Should fix
-loglevel=
flag to throw if an invalid flag is inputted.
Will do!
Though I was thinking about changing from -loglevel=XXX
to -verbose
so they don't have to worry about which log level to set - for ease of setting. What do you think about this? Or would you prefer a finer granularity of log level setting?
Yes! I think that would be alot nicer, I think there should be default responses (like a simple success/error) for rpc calls but full responses should be given when the user uses the --verbose
flag. That way it is more simple and intuitive for people to use
but i think for testing purposes, the more the better so maybe we can have something like --verbosedev
for more verbose outputs. However, I think for the production application, it would be best to have just --verbose
I think there should be default responses (like a simple success/error) for rpc calls
Currently we use return code to indicate if the client request succeeded (i.e., a failed request will trigger os.exit(1)
). Is this approach handy to you or do you prefer printing out simple response?
Closed via #117
How can it be fixed?
Make log output setting simpler.
-verbose
will print all log, otherwise onlyError
andFatal
logs will be printed.