@@ -90,8 +90,8 @@ bool ProjMgr::PrintUsage(
9090 string signature = string (" csolution: Project Manager " ) + VERSION_STRING + string (" " ) + COPYRIGHT_NOTICE;
9191 if (cmd.empty () && subCmd.empty ()) {
9292 // print main help
93- cout << signature << endl;
94- cout << USAGE << endl;
93+ ProjMgrLogger::out () << signature << endl;
94+ ProjMgrLogger::out () << USAGE << endl;
9595 return true ;
9696 }
9797
@@ -102,7 +102,7 @@ bool ProjMgr::PrintUsage(
102102 }
103103
104104 // print command help
105- cout << signature << endl;
105+ ProjMgrLogger::out () << signature << endl;
106106 auto [optionalArg, cmdOptions] = cmdOptionsDict.at (filter);
107107
108108 string program = ORIGINAL_FILENAME + string (" " ) + cmd +
@@ -123,12 +123,12 @@ bool ProjMgr::PrintUsage(
123123 options.custom_help (RteUtils::EMPTY_STRING);
124124 }
125125
126- cout << options.help () << endl;
126+ ProjMgrLogger::out () << options.help () << endl;
127127 return true ;
128128}
129129
130130void ProjMgr::ShowVersion (void ) {
131- cout << ORIGINAL_FILENAME << " " << VERSION_STRING << " " << COPYRIGHT_NOTICE << endl;
131+ ProjMgrLogger::out () << ORIGINAL_FILENAME << " " << VERSION_STRING << " " << COPYRIGHT_NOTICE << endl;
132132}
133133
134134int ProjMgr::ParseCommandLine (int argc, char ** argv) {
@@ -733,7 +733,7 @@ bool ProjMgr::RunListPacks(void) {
733733 vector<string> packs;
734734 bool ret = m_worker.ListPacks (packs, m_missingPacks, m_filter);
735735 for (const auto & pack : packs) {
736- cout << pack << endl;
736+ ProjMgrLogger::out () << pack << endl;
737737 }
738738 return ret;
739739}
@@ -757,7 +757,7 @@ bool ProjMgr::RunListBoards(void) {
757757 return false ;
758758 }
759759 for (const auto & device : boards) {
760- cout << device << endl;
760+ ProjMgrLogger::out () << device << endl;
761761 }
762762 return true ;
763763}
@@ -781,7 +781,7 @@ bool ProjMgr::RunListDevices(void) {
781781 return false ;
782782 }
783783 for (const auto & device : devices) {
784- cout << device << endl;
784+ ProjMgrLogger::out () << device << endl;
785785 }
786786 return true ;
787787}
@@ -806,7 +806,7 @@ bool ProjMgr::RunListComponents(void) {
806806 }
807807
808808 for (const auto & component : components) {
809- cout << component << endl;
809+ ProjMgrLogger::out () << component << endl;
810810 }
811811 return true ;
812812}
@@ -829,7 +829,7 @@ bool ProjMgr::RunListConfigs() {
829829 }
830830
831831 for (const auto & configFile : configFiles) {
832- cout << configFile << endl;
832+ ProjMgrLogger::out () << configFile << endl;
833833 }
834834 return true ;
835835}
@@ -852,7 +852,7 @@ bool ProjMgr::RunListDependencies(void) {
852852 }
853853
854854 for (const auto & dependency : dependencies) {
855- cout << dependency << endl;
855+ ProjMgrLogger::out () << dependency << endl;
856856 }
857857 return true ;
858858}
@@ -868,7 +868,7 @@ bool ProjMgr::RunListContexts(void) {
868868 return false ;
869869 }
870870 for (const auto & context : contexts) {
871- cout << context << endl;
871+ ProjMgrLogger::out () << context << endl;
872872 }
873873 return true ;
874874}
@@ -891,7 +891,7 @@ bool ProjMgr::RunListGenerators(void) {
891891 }
892892
893893 for (const auto & generator : generators) {
894- cout << generator << endl;
894+ ProjMgrLogger::out () << generator << endl;
895895 }
896896 return true ;
897897}
@@ -930,7 +930,7 @@ bool ProjMgr::RunListLayers(void) {
930930
931931 if (!m_updateIdx) {
932932 for (const auto & layer : layers) {
933- cout << layer << endl;
933+ ProjMgrLogger::out () << layer << endl;
934934 }
935935 }
936936
@@ -986,7 +986,7 @@ bool ProjMgr::RunCodeGenerator(void) {
986986 return false ;
987987 }
988988 }
989-
989+
990990 if (m_worker.HasToolchainErrors ()) {
991991 return false ;
992992 }
@@ -1027,7 +1027,7 @@ bool ProjMgr::RunListToolchains(void) {
10271027 toolchainsSet.insert (toolchainEntry);
10281028 }
10291029 for (const auto & toolchainEntry : toolchainsSet) {
1030- cout << toolchainEntry;
1030+ ProjMgrLogger::out () << toolchainEntry;
10311031 }
10321032 // If the worker has toolchain errors, set the success flag to false
10331033 if (m_worker.HasToolchainErrors ()) {
@@ -1040,11 +1040,11 @@ bool ProjMgr::RunListEnvironment(void) {
10401040 string notFound = " <Not Found>" ;
10411041 EnvironmentList env;
10421042 m_worker.ListEnvironment (env);
1043- cout << " CMSIS_PACK_ROOT=" << (env.cmsis_pack_root .empty () ? notFound : env.cmsis_pack_root ) << endl;
1044- cout << " CMSIS_COMPILER_ROOT=" << (env.cmsis_compiler_root .empty () ? notFound : env.cmsis_compiler_root ) << endl;
1043+ ProjMgrLogger::out () << " CMSIS_PACK_ROOT=" << (env.cmsis_pack_root .empty () ? notFound : env.cmsis_pack_root ) << endl;
1044+ ProjMgrLogger::out () << " CMSIS_COMPILER_ROOT=" << (env.cmsis_compiler_root .empty () ? notFound : env.cmsis_compiler_root ) << endl;
10451045 CrossPlatformUtils::REG_STATUS status = CrossPlatformUtils::GetLongPathRegStatus ();
10461046 if (status != CrossPlatformUtils::REG_STATUS::NOT_SUPPORTED) {
1047- cout << " Long pathname support=" <<
1047+ ProjMgrLogger::out () << " Long pathname support=" <<
10481048 (status == CrossPlatformUtils::REG_STATUS::ENABLED ? " enabled" : " disabled" ) << endl;
10491049 }
10501050 return true ;
0 commit comments