Skip to content
Discussion options

You must be logged in to vote

-v does not take a value in this CLI. It is a counter flag, so Clap parses extra words like DEBUG, INFO, 1 as unexpected positional arguments.

Use repeated v flags instead:

ssserver.exe -c config.json        # default, level 0
ssserver.exe -c config.json -v     # level 1 / debug for shadowsocks modules
ssserver.exe -c config.json -vv    # level 2 / trace for shadowsocks modules
ssserver.exe -c config.json -vvv   # more verbose trace

The code defines it as ArgAction::Count, and the logger maps the count roughly like this:

  • 0: normal/info for shadowsocks modules
  • 1: debug
  • 2: trace
  • 3+: very broad trace

If you prefer config file syntax, the same setting is:

{
  "log": {
    "level": 1
  }
}

S…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@GF-Huang
Comment options

Answer selected by GF-Huang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants