jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h | 2 - jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 16 +++++------ jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 28 ++++++++++---------- 3 files changed, 22 insertions(+), 24 deletions(-)
New commits: commit cc81e6ed1aa0a60e35ba1e6e034643d36dc19220 Author: Gabor Kelemen <[email protected]> AuthorDate: Sat Aug 16 10:19:05 2025 +0200 Commit: Gabor Kelemen <[email protected]> CommitDate: Wed Sep 17 08:12:38 2025 +0200 Drop JFW_TRACE2 wrapper over SAL_INFO Change-Id: I5869e5de42b85a4c2500d1e8c3cf39b82aa6f57c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189782 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <[email protected]> diff --git a/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h b/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h index 605012dac302..0299941d985a 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h +++ b/jvmfwk/plugins/sunmajor/pluginlib/diagnostics.h @@ -26,8 +26,6 @@ #define JFW_ENSURE(c, m) SAL_WARN_IF(!(c), "jfw", m) -#define JFW_TRACE2(m) SAL_INFO("jfw.level2", m) - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index db9ca2db6a9c..5dcbb8de016d 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -629,7 +629,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( if ( !JvmfwkUtil_isLoadableJVM( sRuntimeLib ) ) return javaPluginError::VmCreationFailed; #endif - JFW_TRACE2("Using Java runtime library: " << sRuntimeLib); + SAL_INFO("jfw.level2", "Using Java runtime library: " << sRuntimeLib); #ifndef ANDROID // On linux we load jvm with RTLD_GLOBAL. This is necessary for debugging, because @@ -815,7 +815,7 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( else { *ppVm = pJavaVM; - JFW_TRACE2("JVM created"); + SAL_INFO("jfw.level2", "JVM created"); } #else (void) arOptions; @@ -860,37 +860,37 @@ javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, bool *exist) if (ret == javaPluginError::NONE && *exist) { OUString sRuntimeLib = getRuntimeLib(pInfo->arVendorData); - JFW_TRACE2("Checking existence of Java runtime library"); + SAL_INFO("jfw.level2", "Checking existence of Java runtime library"); ::osl::DirectoryItem itemRt; ::osl::File::RC rc_itemRt = ::osl::DirectoryItem::get(sRuntimeLib, itemRt); if (::osl::File::E_None == rc_itemRt) { *exist = true; - JFW_TRACE2("Java runtime library exist: " << sRuntimeLib); + SAL_INFO("jfw.level2", "Java runtime library exist: " << sRuntimeLib); // Check version rtl::Reference<VendorBase> aVendorInfo = getJREInfoByPath(sLocation); if (!aVendorInfo.is()) { *exist = false; - JFW_TRACE2("JRE or supported vendor not accessible at location: " << sLocation); + SAL_INFO("jfw.level2", "JRE or supported vendor not accessible at location: " << sLocation); } else if(pInfo->sVersion!=aVendorInfo->getVersion()) { *exist = false; - JFW_TRACE2("Mismatch between version number in libreoffice settings and installed JRE: " << pInfo->sVersion <<" != " << aVendorInfo->getVersion()); + SAL_INFO("jfw.level2", "Mismatch between version number in libreoffice settings and installed JRE: " << pInfo->sVersion <<" != " << aVendorInfo->getVersion()); } } else if (::osl::File::E_NOENT == rc_itemRt) { *exist = false; - JFW_TRACE2("Java runtime library does not exist: " << sRuntimeLib); + SAL_INFO("jfw.level2", "Java runtime library does not exist: " << sRuntimeLib); } else { ret = javaPluginError::Error; - JFW_TRACE2("Error while looking for Java runtime library: " << sRuntimeLib); + SAL_INFO("jfw.level2", "Error while looking for Java runtime library: " << sRuntimeLib); } } return ret; diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index a1657ee6ad42..26ab4cab5567 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -401,7 +401,7 @@ bool getJavaProps(const OUString & exePath, FileHandleReader stdoutReader(fileOut); rtl::Reference< AsynchReader > stderrReader(new AsynchReader(fileErr)); - JFW_TRACE2("Executing: " + exePath); + SAL_INFO("jfw.level2", "Executing: " + exePath); oslProcessError procErr = osl_executeProcess_WithRedirectedIO( exePath.pData,//usExe.pData, args, @@ -418,7 +418,7 @@ bool getJavaProps(const OUString & exePath, if( procErr != osl_Process_E_None) { - JFW_TRACE2("Execution failed"); + SAL_INFO("jfw.level2", "Execution failed"); *bProcessRun = false; SAL_WARN("jfw", "osl_executeProcess failed (" << ret << "): \"" << exePath << "\""); @@ -426,7 +426,7 @@ bool getJavaProps(const OUString & exePath, } else { - JFW_TRACE2("Java executed successfully"); + SAL_INFO("jfw.level2", "Java executed successfully"); *bProcessRun = true; } @@ -435,7 +435,7 @@ bool getJavaProps(const OUString & exePath, //Use this thread to read output stream FileHandleReader::Result rs = FileHandleReader::RESULT_OK; - JFW_TRACE2("Properties found:"); + SAL_INFO("jfw.level2", "Properties found:"); while (true) { OString aLine; @@ -445,7 +445,7 @@ bool getJavaProps(const OUString & exePath, OUString sLine; if (!decodeOutput(aLine, &sLine)) continue; - JFW_TRACE2(" \"" << sLine << "\""); + SAL_INFO("jfw.level2", " \"" << sLine << "\""); sLine = sLine.trim(); if (sLine.isEmpty()) continue; @@ -472,7 +472,7 @@ bool getJavaProps(const OUString & exePath, //process error stream data stderrReader->join(); - JFW_TRACE2("Java wrote to stderr:\" " + SAL_INFO("jfw.level2", "Java wrote to stderr:\" " << stderrReader->getData() << " \""); TimeValue waitMax= {5 ,0}; @@ -852,7 +852,7 @@ rtl::Reference<VendorBase> getJREInfoByPath( SameOrSubDirJREMap(sResolvedDir)); if (entry2 != mapJREs.end()) { - JFW_TRACE2("JRE found again (detected before): " << sResolvedDir); + SAL_INFO("jfw.level2", "JRE found again (detected before): " << sResolvedDir); return entry2->second; } @@ -902,7 +902,7 @@ rtl::Reference<VendorBase> getJREInfoByPath( auto entry = mapJREs.find(sFilePath); if (entry != mapJREs.end()) { - JFW_TRACE2("JRE found again (detected before): " << sFilePath); + SAL_INFO("jfw.level2", "JRE found again (detected before): " << sFilePath); return entry->second; } @@ -1005,7 +1005,7 @@ rtl::Reference<VendorBase> getJREInfoByPath( } else { - JFW_TRACE2("Found JRE: " << sResolvedDir << " at: " << path); + SAL_INFO("jfw.level2", "Found JRE: " << sResolvedDir << " at: " << path); mapJREs.emplace(sResolvedDir, ret); mapJREs.emplace(sFilePath, ret); @@ -1127,7 +1127,7 @@ void addJavaInfosDirScan( std::vector<rtl::Reference<VendorBase>> & allInfos, std::vector<rtl::Reference<VendorBase>> & addedInfos) { - JFW_TRACE2("Checking /usr/jdk/latest"); + SAL_INFO("jfw.level2", "Checking /usr/jdk/latest"); getAndAddJREInfoByPath("file:////usr/jdk/latest", allInfos, addedInfos); } @@ -1210,10 +1210,10 @@ void addJavaInfosDirScan( case File::E_NOTDIR: continue; case File::E_ACCES: - JFW_TRACE2("Could not read directory " << usDir2 << " because of missing access rights"); + SAL_INFO("jfw.level2", "Could not read directory " << usDir2 << " because of missing access rights"); continue; default: - JFW_TRACE2("Could not read directory " << usDir2 << ". Osl file error: " << openErr); + SAL_INFO("jfw.level2", "Could not read directory " << usDir2 << ". Osl file error: " << openErr); continue; } @@ -1225,10 +1225,10 @@ void addJavaInfosDirScan( File::RC errStatus = File::E_None; if ((errStatus = curIt.getFileStatus(aStatus)) != File::E_None) { - JFW_TRACE2(excMessage + "getFileStatus failed with error " << errStatus); + SAL_INFO("jfw.level2", excMessage + "getFileStatus failed with error " << errStatus); continue; } - JFW_TRACE2("Checking if directory: " << aStatus.getFileURL() << " is a Java"); + SAL_INFO("jfw.level2", "Checking if directory: " << aStatus.getFileURL() << " is a Java"); getAndAddJREInfoByPath( aStatus.getFileURL(), allInfos, addedInfos);
