Skip to content

Commit

Permalink
Revert "Improve service dependency error logging (#703)" (#712)
Browse files Browse the repository at this point in the history
This reverts commit 611c92b.
  • Loading branch information
achristoforides committed Aug 3, 2022
1 parent 611c92b commit a34977c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 174 deletions.
1 change: 0 additions & 1 deletion compendium/DeclarativeServices/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ set(_declarativeservices_tests
TestRegistrationManager.cpp
TestSCRBundleExtension.cpp
TestServiceComponentRuntimeImpl.cpp
TestServiceDependencyErrorLogging.cpp
TestServiceMetadataParserV1.cpp
TestSetConfiguration.cpp
TestSingletonComponentConfiguration.cpp
Expand Down

This file was deleted.

19 changes: 1 addition & 18 deletions framework/src/service/ServiceListeners.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,24 +446,7 @@ void ServiceListeners::GetMatchingServiceListeners(const ServiceEvent& evt,
const LDAPExpr& ldapExpr = sse.GetLDAPExpr();
if (ldapExpr.IsNull() || ldapExpr.Evaluate(props, false)) {
set.insert(sse);
} else if (evt.GetType() == ServiceEvent::SERVICE_REGISTERED) {
// get the props key and value for logging
std::string propsKeyValues{};

auto key = props->Keys_unlocked();
for (auto k : key) {
auto val = props->Value_unlocked(k).ToString();
propsKeyValues += k + " : " + val + ", ";
}

const std::string msg =
"Service listener matching LDAP filter could "
"not be found using LDAP filter: " +
sse.GetFilter() + ". Please verify the LDAP filter value in service properties: " + "{" + propsKeyValues + "}";

coreCtx->logger->Log(
cppmicroservices::logservice::SeverityLevel::LOG_DEBUG, msg);
}
}
}

// Check the cache
Expand Down

0 comments on commit a34977c

Please sign in to comment.