Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_log_level should be consistent with run --verbose #736

Open
qrkourier opened this issue Sep 20, 2023 · 1 comment
Open

set_log_level should be consistent with run --verbose #736

qrkourier opened this issue Sep 20, 2023 · 1 comment

Comments

@qrkourier
Copy link
Member

Let set_log_level accept valid log level labels, rejecting invalid strings, or valid numbers, to be consistent with args to run --verbose option.

It currently respects only log level labels like INFO, but fails silently to set the level when the arg is like --loglevel 3 or --loglevel BOGUS.

We could add a usage hint to clarify the expected format of that arg like this.

@qrkourier
Copy link
Member Author

❯ jq .LogLevel /var/lib/ziti/config.json
"debug"

❯ build/programs/ziti-edge-tunnel/Release/ziti-edge-tunnel set_log_level --loglevel 3
received response <{"Success":true,"Code":0}
>

❯ jq .LogLevel /var/lib/ziti/config.json                                             
"debug"

❯ build/programs/ziti-edge-tunnel/Release/ziti-edge-tunnel set_log_level --loglevel INFO
received response <{"Success":true,"Code":0}
>

❯ jq .LogLevel /var/lib/ziti/config.json                                                
"info"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant