From 17353921dfaffc16ae35ab5c5e695c39a0fec15d Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 25 Jan 2023 17:10:37 +0100 Subject: [PATCH] [chip-tool] Log decoded json command (#24640) --- examples/chip-tool/commands/common/Commands.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/chip-tool/commands/common/Commands.cpp b/examples/chip-tool/commands/common/Commands.cpp index 1b22c681deabda..fb675ee96acb4d 100644 --- a/examples/chip-tool/commands/common/Commands.cpp +++ b/examples/chip-tool/commands/common/Commands.cpp @@ -118,12 +118,16 @@ int Commands::RunInteractive(const char * command) char * argv[kInteractiveModeArgumentsMaxLength] = {}; argv[argc++] = kInteractiveModeName; + std::string commandStr; for (auto & arg : arguments) { argv[argc] = new char[arg.size() + 1]; strcpy(argv[argc++], arg.c_str()); + commandStr += arg; + commandStr += " "; } + ChipLogProgress(chipTool, "Command: %s", commandStr.c_str()); auto err = RunCommand(argc, argv, true); // Do not delete arg[0]