WL#12604: emphasis output of router executables for better readablity

Affects: Server-8.0   —   Status: Complete   —   Priority: Medium

Motivation

MySQL Router and its tools present output to users sometime overwhelm the user with information.

To make it easier for a human to see which information is important, the output should:

  • emphasis important information and sections
  • use consistent coloring of ERROR cases
  • annotate --help output

and fallback to "no annotation" if the output-channel is not a aware of ANSI ESC sequences.

Goal

apply colors and emphasis to

  • all --help output for mysqlrouter and mysqlrouter_* tools
  • mysqlrouter --bootstrap output

Functional Requirements

FR1
Colors MUST only be output if the target is a TTY that supports it.

Implementation

  • Output is "markdown"-like and uses the "headings" for sections.
  • Headings are highlighted with "Bold"
  • Errors are marked as "Red"
  • Success in router's bootstrap is high-lighted in "Green"

Example

Usage: mysqlrouter_plugin_info <mysqlrouter_plugin_file> <plugin_name>                               

# Examples

Print plugin information:

    mysqlrouter_plugin_info.exe "c:\Program Files\MySQL\MySQL Router 8.0\lib\routing.dll" routing

# Options

  -V, --version
      Display version information and exit.
  -?, --help
      Display this help and exit.