diff --git a/ecmascript/compiler/aot_compiler_preprocessor.cpp b/ecmascript/compiler/aot_compiler_preprocessor.cpp index f9b9411d6c08f2fedcb550a4c79e6d9235ff6879..55ecf5e3faf82b51ffe5cbc79e2dacaae7246d8a 100644 --- a/ecmascript/compiler/aot_compiler_preprocessor.cpp +++ b/ecmascript/compiler/aot_compiler_preprocessor.cpp @@ -307,13 +307,12 @@ std::shared_ptr AotCompilerPreprocessor::CreateAndVerifyJSPandaFile jsPandaFile = jsPandaFileManager->OpenJSPandaFile(fileName.c_str()); } if (jsPandaFile == nullptr) { - LOG_ECMA(ERROR) << "open file " << fileName << " error"; + LOG_ECMA(ERROR) << "open file error!"; return nullptr; } if (!jsPandaFile->IsNewVersion()) { - LOG_COMPILER(ERROR) << "AOT only support panda file with new ISA, while the '" << - fileName << "' file is the old version"; + LOG_COMPILER(ERROR) << "AOT only support panda file with new ISA, while the file is the old version"; return nullptr; } @@ -494,7 +493,7 @@ bool AotCompilerPreprocessor::ForbidenRebuildAOT(std::string &fileName) const { std::string realPath; if (!RealPath(fileName, realPath, false)) { - LOG_COMPILER(ERROR) << "Fail to get realPath: " << fileName; + LOG_COMPILER(ERROR) << "Fail to get realPath."; return true; } if (FileExist(realPath.c_str())) { diff --git a/ecmascript/compiler/aot_file/an_file_data_manager.cpp b/ecmascript/compiler/aot_file/an_file_data_manager.cpp index 9518c24072b6ee1832e9543401ad03ef7cee970c..3c6dedbd43469f105e90da3c33da77db287c0a92 100644 --- a/ecmascript/compiler/aot_file/an_file_data_manager.cpp +++ b/ecmascript/compiler/aot_file/an_file_data_manager.cpp @@ -267,9 +267,7 @@ bool AnFileDataManager::UnsafeCheckFilenameToChecksum(const CString &fileName, u if (fileName == fileNameToChecksumPair.first) { if (fileNameToChecksumPair.second == static_cast(-1) || fileNameToChecksumPair.second != checksum) { - LOG_COMPILER(ERROR) << "an file verify checksum fail: checksum is invalid or different. FileName: " - << fileName << " old checksum: " << fileNameToChecksumPair.second - << " provided new checksum " << checksum; + LOG_COMPILER(ERROR) << "an file verify checksum fail, checksum is invalid or different!"; return false; } else { return true; diff --git a/ecmascript/compiler/aot_file/an_file_info.cpp b/ecmascript/compiler/aot_file/an_file_info.cpp index 7ab7498f119eacac55e6319d02299594e177ed98..666a5fd0eac473a91917042ee9b74f4516a25cbb 100644 --- a/ecmascript/compiler/aot_file/an_file_info.cpp +++ b/ecmascript/compiler/aot_file/an_file_info.cpp @@ -105,8 +105,7 @@ bool AnFileInfo::Load(const std::string &filename) { std::string realPath; if (!RealPath(filename, realPath, false)) { - LOG_COMPILER(ERROR) << "Can not load aot file from path [ " << filename << " ], " - << "please execute ark_aot_compiler with options --aot-file."; + LOG_COMPILER(ERROR) << "Can not load aot file, please execute ark_aot_compiler with options --aot-file."; return false; } if (!FileExist(realPath.c_str())) { @@ -152,7 +151,7 @@ bool AnFileInfo::TryRemoveAnFile(const char *filename) return true; } if (Unlink(filename) == -1) { - LOG_COMPILER(ERROR) << "remove " << filename << " failed and errno is " << errno; + LOG_COMPILER(ERROR) << "remove file failed and errno is " << errno; return false; } return true; diff --git a/ecmascript/compiler/aot_file/stub_file_info.cpp b/ecmascript/compiler/aot_file/stub_file_info.cpp index a52d91f36fcee19137d8801e677fe2538ae8442c..79d54545eff8606089f26af5e0a39908de1c864f 100644 --- a/ecmascript/compiler/aot_file/stub_file_info.cpp +++ b/ecmascript/compiler/aot_file/stub_file_info.cpp @@ -68,8 +68,7 @@ bool StubFileInfo::MmapLoad(const std::string &fileName) std::string filename = fileName.empty() ? STUB_AN_FILE : fileName; std::string realPath; if (!RealPath(filename, realPath, false)) { - LOG_COMPILER(ERROR) << "Can not load stub file from path [ " << filename << " ], " - << "please execute ark_stub_compiler with options --stub-file."; + LOG_COMPILER(ERROR) << "Can not load stub file, please execute ark_stub_compiler with options --stub-file."; return false; } diff --git a/ecmascript/compiler/file_generators.cpp b/ecmascript/compiler/file_generators.cpp index dbdbe5a7702d435d5ea5656d1dff0546b4fc8cb4..cccaa898fcabf876ab758aa6daa1eba5a7860983 100644 --- a/ecmascript/compiler/file_generators.cpp +++ b/ecmascript/compiler/file_generators.cpp @@ -637,7 +637,7 @@ bool AOTFileGenerator::CreateDirIfNotExist(const std::string &filename) } std::string path = realPath.substr(0, index); if (!panda::ecmascript::ForceCreateDirectory(path)) { - LOG_COMPILER(ERROR) << "Fail to make dir: " << path; + LOG_COMPILER(ERROR) << "Fail to make dir!"; return false; } return panda::ecmascript::SetDirModeAsDefault(path); @@ -662,7 +662,7 @@ bool AOTFileGenerator::SaveAOTFile(const std::string &filename, const std::strin return false; } if (!panda::ecmascript::SetFileModeAsDefault(filename)) { - LOG_COMPILER(ERROR) << "Fail to set an file mode:" << filename; + LOG_COMPILER(ERROR) << "Fail to set an file mode!"; return false; } SetSecurityLabel(filename); @@ -673,7 +673,7 @@ bool AOTFileGenerator::SaveAOTFile(const std::string &filename, const std::strin void AOTFileGenerator::SaveEmptyAOTFile(const std::string& filename, const std::string& appSignature, bool isAnFile) { if (!CreateDirIfNotExist(filename)) { - LOG_COMPILER(ERROR) << "Fail to access dir: " << filename; + LOG_COMPILER(ERROR) << "Fail to access dir!"; return; } std::string realPath; @@ -846,7 +846,7 @@ std::string AOTFileGenerator::GenAotCodeCommentFileName(const std::string &filen bool AOTFileGenerator::CreateAOTCodeCommentFile(const std::string &filename) { if (!CreateDirIfNotExist(filename)) { - LOG_COMPILER(ERROR) << "Fail to access dir: " << filename; + LOG_COMPILER(ERROR) << "Fail to access dir!"; return false; } diff --git a/ecmascript/compiler/pass_manager.cpp b/ecmascript/compiler/pass_manager.cpp index 280589e15232183f6ed9c8e02f5e20216b0bc199..e2e75bd673a64ab84cf8d1fb44cb2da8825255c8 100644 --- a/ecmascript/compiler/pass_manager.cpp +++ b/ecmascript/compiler/pass_manager.cpp @@ -257,8 +257,8 @@ bool PassManager::Compile(JSPandaFile *jsPandaFile, const std::string &fileName, // Checking released/debuggable pandafile uses method literals, which are initialized in BytecodeInfoCollector, // should after it. if (!IsReleasedPandaFile(jsPandaFile)) { - LOG_COMPILER(ERROR) << "The input panda file [" << fileName - << "] of AOT Compiler is debuggable version, do not use for performance test!"; + LOG_COMPILER(ERROR) << "The input panda file of AOT Compiler is debuggable version, + do not use for performance test!"; } LOptions lOptions(optLevel_, FPFlag::RESERVE_FP, relocMode_); CompilationDriver cmpDriver(profilerDecoder_, diff --git a/ecmascript/pgo_profiler/pgo_profiler_manager.cpp b/ecmascript/pgo_profiler/pgo_profiler_manager.cpp index a18dffe0b3595351c9b25576e342647c0ac391d5..a72c5af5880ec39cf197e84767f7d0f36cd67369 100644 --- a/ecmascript/pgo_profiler/pgo_profiler_manager.cpp +++ b/ecmascript/pgo_profiler/pgo_profiler_manager.cpp @@ -50,7 +50,7 @@ bool PGOProfilerManager::MergeApFiles(const std::string& inFiles, for (const auto& fileName: apFileNames) { LOG_ECMA(INFO) << "merge ap file: " << fileName; if (!base::StringHelper::EndsWith(fileName, ".ap")) { - LOG_ECMA(ERROR) << "The file path (" << fileName << ") does not end with .ap"; + LOG_ECMA(ERROR) << "The file path does not end with .ap"; continue; } PGOProfilerDecoder decoder(fileName, hotnessThreshold); @@ -494,7 +494,7 @@ bool PGOProfilerManager::ResetOutPath(const std::string& fileName) bool PGOProfilerManager::ResetOutPath(const std::string& path, std::string& realPath, const std::string& fileName) { if (!RealPath(path, realPath, false)) { - LOG_PGO(ERROR) << "get real path failed, outDir: " << path; + LOG_PGO(ERROR) << "get real path failed!"; return false; }