Documentation Home
MySQL Shell 8.0
Related Documentation Download this Manual
PDF (US Ltr) - 491.7Kb
PDF (A4) - 492.2Kb
HTML Download (TGZ) - 98.9Kb
HTML Download (Zip) - 110.6Kb


MySQL Shell 8.0  /  MySQL Shell Logging and Debug

Chapter 8 MySQL Shell Logging and Debug

You can use MySQL Shell's logging feature to verify the state of MySQL Shell while it is running and to troubleshoot any issues.

By default, MySQL Shell sends logging information at logging level 5 (error, warning, and informational messages) to an application log file. You can also configure MySQL Shell to send the information to an optional additional viewable location, and (from MySQL 8.0.17) to the console as verbose output.

You can control the level of detail to be sent to each destination. For the application log and additional viewable location, you can specify any of the available levels as the maximum level of detail. For verbose output, you can specify a setting that maps to a maximum level of detail. The following levels of detail are available:

Table 8.1 Logging levels in MySQL Shell

Logging Level - Numeric Logging Level - Text Meaning Verbose Setting

1

none

No logging

0

2

internal

Internal Error

1

3

error

Error

1

4

warning

Warning

1

5

info

Informational

1

6

debug

Debug

2

7

debug2

Debug2

3

8

debug3

Debug3

4

By default, MySQL Shell does not log or output SQL statements that are executed in the course of AdminAPI operations. From MySQL Shell 8.0.18, you can activate logging for these statements if you want to observe the progress of these operations in terms of SQL execution, in addition to the messages returned during the operations. The statements are written to the MySQL Shell application log file as informational messages provided that the logging level is set to 5 or above. They are also sent to the console as verbose output provided that the verbose setting is 1 or above.

For instructions to configure the application log and the optional additional destination, which is stderr on Unix-based systems or the OutputDebugString() function on Windows systems, see Section 8.1, “Application Log”.

For instructions to send logging information to the console as verbose output, see Section 8.2, “Verbose Output”.

For instructions to activate logging for SQL statements that are executed by AdminAPI operations, see Section 8.3, “Logging AdminAPI Operations”.