summaryrefslogtreecommitdiff
path: root/jvmfwk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-05-27 17:24:02 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-05-27 17:24:02 +0200
commitf9d2bfec02042c5391cb838786577ad32365a56b (patch)
tree227f16f7102fddfc960ef1523bf537896dc46db5 /jvmfwk
parent0123bbbc4d07fd7d6c233f67139984ab3cd4555d (diff)
fprintf -> SAL_INFO
Change-Id: I4808e89cf5b90c99df3d4c4474c578a8c8f611a6
Diffstat (limited to 'jvmfwk')
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx3
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx7
-rw-r--r--jvmfwk/source/fwkbase.cxx61
-rw-r--r--jvmfwk/source/fwkutil.hxx9
4 files changed, 29 insertions, 51 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 18c72806b55b..4094600bb5f3 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -28,9 +28,6 @@
# include <dlfcn.h>
#endif
-#if OSL_DEBUG_LEVEL > 0
-#include <stdio.h>
-#endif
#include <string.h>
#include "boost/scoped_array.hpp"
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
index ee4d6d0ee2da..ef81466b70f0 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx
@@ -61,11 +61,8 @@ bool isVendorSupported(const OUString& sVendor)
if (sVendor.equalsAscii(gVendorMap[pos].sVendorName))
return true;
}
-#if OSL_DEBUG_LEVEL >= 2
- OString sVendorName = OUStringToOString(sVendor, osl_getThreadTextEncoding());
- fprintf(stderr, "[Java frameworksunjavaplugin.so]sunjavaplugin does not support vendor: %s.\n",
- sVendorName.getStr());
-#endif
+ SAL_INFO(
+ "jfw.level2", "sunjavaplugin does not support vendor: " << sVendor);
return false;
}
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 9c79344496d8..0a7e414ed49e 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -239,11 +239,9 @@ std::vector<OUString> VendorSettings::getSupportedVendors()
OString sParam =
OUStringToOString(sValue, osl_getThreadTextEncoding());
vecParams.push_back(sParam);
-#if OSL_DEBUG_LEVEL >=2
- OString sParamName = OUStringToOString(sName, osl_getThreadTextEncoding());
- fprintf(stderr,"[Java framework] Using bootstrap parameter %s"
- " = %s.\n", sParamName.getStr(), sParam.getStr());
-#endif
+ SAL_INFO(
+ "jfw.level2",
+ "Using bootstrap parameter " << sName << " = " << sParam);
}
else
break;
@@ -270,10 +268,10 @@ OString BootParams::getClasspath()
sCP))
{
sClassPath = OUStringToOString(sCP, osl_getThreadTextEncoding());
-#if OSL_DEBUG_LEVEL >=2
- fprintf(stderr,"[Java framework] Using bootstrap parameter "
- UNO_JAVA_JFW_CLASSPATH " = %s.\n", sClassPath.getStr());
-#endif
+ SAL_INFO(
+ "jfw.level2",
+ "Using bootstrap parameter " UNO_JAVA_JFW_CLASSPATH " = "
+ << sClassPath);
}
OUString sEnvCP;
@@ -287,10 +285,10 @@ OString BootParams::getClasspath()
char szSep[] = {SAL_PATHSEPARATOR,0};
sClassPath += OString(szSep) + OString(pCp);
}
-#if OSL_DEBUG_LEVEL >=2
- fprintf(stderr,"[Java framework] Using bootstrap parameter "
- UNO_JAVA_JFW_ENV_CLASSPATH " and class path is:\n %s.\n", pCp ? pCp : "");
-#endif
+ SAL_INFO(
+ "jfw.level2",
+ "Using bootstrap parameter " UNO_JAVA_JFW_ENV_CLASSPATH
+ " and class path is: " << (pCp ? pCp : ""));
}
return sClassPath;
@@ -326,11 +324,10 @@ OUString BootParams::getVendorSettings()
UNO_JAVA_JFW_VENDOR_SETTINGS));
}
}
-#if OSL_DEBUG_LEVEL >=2
- OString sValue = OUStringToOString(sVendor, osl_getThreadTextEncoding());
- fprintf(stderr,"[Java framework] Using bootstrap parameter "
- UNO_JAVA_JFW_VENDOR_SETTINGS" = %s.\n", sValue.getStr());
-#endif
+ SAL_INFO(
+ "jfw.level2",
+ "Using bootstrap parameter " UNO_JAVA_JFW_VENDOR_SETTINGS " = "
+ << sVendor);
}
return sVendor;
}
@@ -372,10 +369,10 @@ OUString BootParams::getJREHome()
JFW_E_ERROR,
OString("[Java framework] Error in function BootParams::getJREHome() "
"(fwkbase.cxx)."));
-#if OSL_DEBUG_LEVEL >=2
- fprintf(stderr,"[Java framework] Using bootstrap parameter "
- UNO_JAVA_JFW_ENV_JREHOME" with JAVA_HOME = %s.\n", pJRE);
-#endif
+ SAL_INFO(
+ "jfw.level2",
+ "Using bootstrap parameter " UNO_JAVA_JFW_ENV_JREHOME
+ " with JAVA_HOME = " << pJRE);
}
else if (getMode() == JFW_MODE_DIRECT
&& !bEnvJRE
@@ -388,14 +385,9 @@ OUString BootParams::getJREHome()
" must be set in direct mode."));
}
-#if OSL_DEBUG_LEVEL >=2
- if (bJRE == sal_True)
- {
- OString sValue = OUStringToOString(sJRE, osl_getThreadTextEncoding());
- fprintf(stderr,"[Java framework] Using bootstrap parameter "
- UNO_JAVA_JFW_JREHOME" = %s.\n", sValue.getStr());
- }
-#endif
+ SAL_INFO_IF(
+ bJRE, "jfw.level2",
+ "Using bootstrap parameter " UNO_JAVA_JFW_JREHOME " = " << sJRE);
return sJRE;
}
@@ -405,11 +397,10 @@ OUString BootParams::getClasspathUrls()
Bootstrap::get()->getFrom(
OUString(UNO_JAVA_JFW_CLASSPATH_URLS),
sParams);
-#if OSL_DEBUG_LEVEL >=2
- OString sValue = OUStringToOString(sParams, osl_getThreadTextEncoding());
- fprintf(stderr,"[Java framework] Using bootstrap parameter "
- UNO_JAVA_JFW_CLASSPATH_URLS " = %s.\n", sValue.getStr());
-#endif
+ SAL_INFO(
+ "jfw.level2",
+ "Using bootstrap parameter " UNO_JAVA_JFW_CLASSPATH_URLS " = "
+ << sParams);
return sParams;
}
diff --git a/jvmfwk/source/fwkutil.hxx b/jvmfwk/source/fwkutil.hxx
index 6168d35c40b7..5a9441e98b1f 100644
--- a/jvmfwk/source/fwkutil.hxx
+++ b/jvmfwk/source/fwkutil.hxx
@@ -29,10 +29,6 @@
#include "rtl/ustrbuf.hxx"
#include "rtl/byteseq.hxx"
#include "osl/thread.hxx"
-#if OSL_DEBUG_LEVEL >=2
-#include <stdio.h>
-#endif
-
namespace jfw
{
@@ -58,10 +54,7 @@ struct Bootstrap :
buf.appendAscii(SAL_CONFIGFILE("/jvmfwk3"));
OUString sIni = buf.makeStringAndClear();
::rtl::Bootstrap * bootstrap = new ::rtl::Bootstrap(sIni);
-#if OSL_DEBUG_LEVEL >=2
- OString o = OUStringToOString( sIni , osl_getThreadTextEncoding() );
- fprintf(stderr, "[Java framework] Using configuration file %s\n" , o.getStr() );
-#endif
+ SAL_INFO("jfw.level2", "Using configuration file " << sIni);
return bootstrap;
}
};