Bug #87597 Change mysqlsh --help and error message for --log-level option
Submitted: 30 Aug 2017 7:25 Modified: 25 Apr 2018 16:07
Reporter: Shahriyar Rzayev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Document Store: MySQL Shell Severity:S3 (Non-critical)
Version:8.0.0 OS:Any
Assigned to: CPU Architecture:Any

[30 Aug 2017 7:25] Shahriyar Rzayev
Description:
Hi,

According to:

--log-level=value        The log level.
                           Value must be an integer between 1 and 8 any of
                           [none, internal, error, warning, info, debug,
                           debug2, debug3].

As I understand the "value must be an integer"

$ mysqlsh root:@localhost/generated_columns_test --py --interactive --execute "db.get_collections()" --log-level=1
Creating a Session to 'root@localhost/generated_columns_test'
Your MySQL connection id is 97 (X protocol)
Server version: 5.7.19-17-debug MySQL Community Server (GPL)
Default schema `generated_columns_test` accessible through db.
[
    <Collection:test_coll>,
    <Collection:test_coll1>,

But also I can pass "none":

$ mysqlsh root:@localhost/generated_columns_test --py --interactive --execute "db.get_collections()" --log-level=none
Creating a Session to 'root@localhost/generated_columns_test'
Your MySQL connection id is 98 (X protocol)
Server version: 5.7.19-17-debug MySQL Community Server (GPL)
Default schema `generated_columns_test` accessible through db.
[
    <Collection:test_coll>,
    <Collection:test_coll1>,

Both error message and --help can be changed to something like:

$ mysqlsh root:@localhost/generated_columns_test --py --interactive --execute "db.get_collections()" --log-level=debug-1
                           Value must be an integer between 1 and 8 any of
                           [none, internal, error, warning, info, debug,
                           debug2, debug3].

Changed one:

"Value must be an integer between 1 and 8 or any of
                           [none, internal, error, warning, info, debug,
                           debug2, debug3] respectively"

How to repeat:
See decription
[30 Aug 2017 8:22] MySQL Verification Team
Hello Shahriyar,

Thank you for the report and feedback.

Thanks,
Umesh