Topic: AWS CLI Debug logs are not captured and printed by stdout or stderr
Hi, so i wrote a go program that executes several aws cli commands(aws apigateway get-export and aws apigateway get-rest-apis) in the background, but in debug mode when the aws cli commands are executed with the debug flag (--debug) and when the output of the commands are printed the debug logs are not printed, only the final output(which is the get-export command was successfully executed message or the list of apis from the get-rest-apis cmd) is printed. How do I capture the debug logs of these commands and get them printed in the terminal ?
here is a sample of my code,
cmd_3, err := exec.Command(awsCmdLiteral, apiGateway, getExport, apiIdFlag, api_id, stageNameFlag, stageName, exportTypeFlag, exportType, path, outputFlag, outputType, "--debug").Output()
if err != nil {
return err
}
if utils.VerboseModeEnabled() {
output := string(cmd_3[:])
fmt.Println(output)
}