QuasarApp / QuasarAppLib

global function for quasar app
https://quasarapp.ddns.net:3031/docs/QuasarApp/QuasarAppLib/latest/
GNU Lesser General Public License v3.0
4 stars 2 forks source link

Output all received arguments #21

Closed pzhlkj6612 closed 3 years ago

pzhlkj6612 commented 3 years ago

This can help the user to check all the passed parameters.

> cqtdeployer.exe 'a' 'b' 'c' @('d', 'e', 'f') 'g','h' 'i', 'j' 'PowerShell is a mystery'
Info: Arguments[1]: a
Info: Arguments[2]: b
Info: Arguments[3]: c
Info: Arguments[4]: d
Info: Arguments[5]: e
Info: Arguments[6]: f
Info: Arguments[7]: g,h
Info: Arguments[8]: i
Info: Arguments[9]: j
Info: Arguments[10]: PowerShell is a mystery
...
pzhlkj6612 commented 3 years ago

Close this PR since:

  1. It is not a good idea to output all arguments at any log level.
  2. Outputting the options table (parsed arguments mapping table) may be more helpful for debugging.

An example of options table:

> C:\testcqt\cqtdeployer.exe 'a' 'b' 'c' @('d', 'e', 'f') 'g','h' 'i', 'j' 'PowerShell is a mystery' -verbose '3'
Verbose log: --- Options table start ---
Verbose log: Option[PowerShell is a mystery]
Verbose log: Option[a]
Verbose log: Option[b]
Verbose log: Option[c]
Verbose log: Option[d]
Verbose log: Option[e]
Verbose log: Option[f]
Verbose log: Option[g,h]
Verbose log: Option[i]
Verbose log: Option[j]
Verbose log: Option[verbose]: 3
Verbose log: --- Options table end ---