cli: introduce new flags to write the validation output in json format
removed --debug flag and use --log-level to control logging
introduced --json flag to dump the output in json format, log level is
set to error in this case
# json output
mysql_migrate --validate-only --json
{"method": "dump", "reason": "Replication method is not available due to missing TARGET_MASTER_SERVICE_URI, falling back to dump"}
Removed the --json-file after the review, didn't seem necessary after discussing the use-case:
~~mysql_migrate --validate-only --json-file=/tmp/outout.json --log-level=error
❯ cat /tmp/outout.json
{"method": "dump", "status": "Replication method is not available due to missing TARGET_MASTER_SERVICE_URI, falling back to dump"}~~
Description:
cli: introduce new flags to write the validation output in json format
Removed the
--json-file
after the review, didn't seem necessary after discussing the use-case: ~~mysql_migrate --validate-only --json-file=/tmp/outout.json --log-level=error ❯ cat /tmp/outout.json {"method": "dump", "status": "Replication method is not available due to missing TARGET_MASTER_SERVICE_URI, falling back to dump"}~~EDIT: current state after addressing the review.
Signed-off-by: Ankur Srivastava ansrivas@aiven.io