summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-11-07 16:55:20 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-11-07 16:55:20 +0100
commit14800ce5f2a23ab45b01a631b9253f7f6f3a7ce5 (patch)
treead2bf0fb74e9d5d125a36528d28b9b1f923cb0c9 /xmlsecurity
parent6188a8db559c2a54e545d5b7ec2750521f1bfade (diff)
Improve logging
Change-Id: I5ff457c76970356a5748f6f319f32a1f49b86ca1
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/source/xmlsec/nss/nssinitializer.cxx23
-rw-r--r--xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx7
2 files changed, 24 insertions, 6 deletions
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index a694c3fb9b60..a1c01d304e52 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -53,7 +53,7 @@
#include <rtl/strbuf.hxx>
#include <osl/file.hxx>
#include <osl/thread.h>
-#include <rtl/logfile.hxx>
+#include <sal/log.hxx>
#include "seinitializer_nssimpl.hxx"
#include "../diagnose.hxx"
@@ -172,7 +172,12 @@ void deleteRootsModule()
// first, try to get the profile from "MOZILLA_CERTIFICATE_FOLDER"
const char* pEnv = getenv("MOZILLA_CERTIFICATE_FOLDER");
if (pEnv)
+ {
+ SAL_INFO(
+ "xmlsecurity.xmlsec",
+ "Using Mozilla profile from MOZILLA_CERTIFICATE_FOLDER=" << pEnv);
return rtl::OString(pEnv);
+ }
// second, try to get saved user-preference
try
@@ -181,11 +186,19 @@ void deleteRootsModule()
officecfg::Office::Common::Security::Scripting::CertDir::get().get_value_or(rtl::OUString());
if (!sUserSetCertPath.isEmpty())
+ {
+ SAL_INFO(
+ "xmlsecurity.xmlsec",
+ "Using Mozilla profile from /org.openoffice.Office.Common/"
+ "Security/Scripting/CertDir: " << sUserSetCertPath);
return rtl::OUStringToOString(sUserSetCertPath, osl_getThreadTextEncoding());
+ }
}
catch (const uno::Exception &e)
{
- SAL_WARN("xmlsecurity", "getMozillaCurrentProfile: caught exception" << e.Message);
+ SAL_WARN(
+ "xmlsecurity.xmlsec",
+ "getMozillaCurrentProfile: caught exception " << e.Message);
}
// third, dig around to see if there's one available
@@ -211,13 +224,15 @@ void deleteRootsModule()
if (!profile.isEmpty())
{
rtl::OUString sProfilePath = xMozillaBootstrap->getProfilePath( productTypes[i], profile );
+ SAL_INFO(
+ "xmlsecurity.xmlsec",
+ "Using Mozilla profile " << sProfilePath);
return rtl::OUStringToOString(sProfilePath, osl_getThreadTextEncoding());
}
}
}
- RTL_LOGFILE_PRODUCT_TRACE( "XMLSEC: No Mozilla Profile found!" );
-
+ SAL_INFO("xmlsecurity.xmlsec", "No Mozilla profile found");
return rtl::OString();
}
diff --git a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
index 581663b6ce76..33a1ea3cc223 100644
--- a/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx
@@ -45,7 +45,7 @@
#include <cppuhelper/servicefactory.hxx>
#include <comphelper/docpasswordrequest.hxx>
#include <xmlsecurity/biginteger.hxx>
-#include <rtl/logfile.h>
+#include <sal/log.hxx>
#include <com/sun/star/task/InteractionHandler.hpp>
#include <vector>
#include "boost/scoped_array.hpp"
@@ -444,7 +444,10 @@ void SecurityEnvironment_NssImpl::updateSlots()
if(pSlot != NULL)
{
- RTL_LOGFILE_TRACE2( "XMLSEC: Found a slot: SlotName=%s, TokenName=%s", PK11_GetSlotName(pSlot), PK11_GetTokenName(pSlot) );
+ SAL_INFO(
+ "xmlsecurity.xmlsec",
+ "Found a slot: SlotName=" << PK11_GetSlotName(pSlot)
+ << ", TokenName=" << PK11_GetTokenName(pSlot));
//The following code which is commented out checks if a slot, that is a smart card for example, is
// able to generate a symmetric key of type CKM_DES3_CBC. If this fails then this token