When working with a production deployment it can be useful to
configure verbose logging for MySQL Shell. For example, the
information in the log can help you to find and resolve any issues
that might occur when you are preparing server instances to work
as part of InnoDB Cluster. To start MySQL Shell with a verbose
logging level, use the
$> mysqlsh --log-level=DEBUG3
DEBUG3 level is recommended. For more
DEBUG3 is set the MySQL Shell log file
contains lines such as
Debug: execute_sql( ...
) which contain the SQL queries that are executed as
part of each AdminAPI call. The log file generated by
MySQL Shell is located in
~/.mysqlsh/mysqlsh.log for Unix-based
systems; on Microsoft Windows systems it is located in
%APPDATA%\MySQL\mysqlsh\mysqlsh.log. For more
information, see Chapter 12, MySQL Shell Logging and Debug.
In addition to enabling the MySQL Shell log level, you can configure the amount of output AdminAPI provides in MySQL Shell after issuing each command. To enable the amount of AdminAPI output, in MySQL Shell issue:
This enables the maximum output from AdminAPI calls. The available levels of output are:
0 or OFF is the default. This provides minimal output and is the recommended level when not troubleshooting.
1 or ON adds verbose output from each call to the AdminAPI.
2 adds debug output to the verbose output providing full information about what each call to AdminAPI executes.
MySQL Shell can optionally log the SQL statements used by AdminAPI operations (with the exception of sandbox operations), and can also display them in the terminal as they are executed. For more information, see Section 12.4, “MySQL Shell SQL Logging”.