You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by dg...@apache.org on 2017/09/04 14:05:51 UTC
[16/35] incubator-unomi git commit: Change Info logs to Debug
Change Info logs to Debug
Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/ac12c18b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/ac12c18b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/ac12c18b
Branch: refs/heads/feature-UNOMI-117
Commit: ac12c18b56c5863a1712a05452307c5e508fae44
Parents: 73af8d6
Author: Abdelkader Midani <am...@apache.org>
Authored: Thu Aug 17 12:53:42 2017 +0200
Committer: Abdelkader Midani <am...@apache.org>
Committed: Thu Aug 17 12:53:42 2017 +0200
----------------------------------------------------------------------
.../router/services/ProfileImportServiceImpl.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/ac12c18b/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/ProfileImportServiceImpl.java
----------------------------------------------------------------------
diff --git a/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/ProfileImportServiceImpl.java b/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/ProfileImportServiceImpl.java
index 4ca2a09..93b9190 100644
--- a/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/ProfileImportServiceImpl.java
+++ b/extensions/router/router-service/src/main/java/org/apache/unomi/router/services/ProfileImportServiceImpl.java
@@ -34,41 +34,41 @@ public class ProfileImportServiceImpl extends AbstractCustomServiceImpl implemen
private static final Logger logger = LoggerFactory.getLogger(ProfileImportServiceImpl.class.getName());
public boolean saveMergeDeleteImportedProfile(ProfileToImport profileToImport) throws InvocationTargetException, IllegalAccessException {
- logger.info("Importing profile with ID : {}", profileToImport.getItemId());
+ logger.debug("Importing profile with ID : {}", profileToImport.getItemId());
Profile existingProfile = new Profile();
if(profileToImport.getProperties().get(profileToImport.getMergingProperty()) != null) {
List<Profile> existingProfiles = persistenceService.query("properties." + profileToImport.getMergingProperty(), profileToImport.getProperties().get(profileToImport.getMergingProperty()).toString(), null, Profile.class);
- logger.info("Query existing profile with mergingProperty: {}. Found: {}", profileToImport.getMergingProperty(), existingProfiles.size());
+ logger.debug("Query existing profile with mergingProperty: {}. Found: {}", profileToImport.getMergingProperty(), existingProfiles.size());
//Profile already exist, and import config allow to overwrite profiles
if (existingProfiles.size() == 1) {
existingProfile = existingProfiles.get(0);
if (profileToImport.isProfileToDelete()) {
- logger.info("Profile is to delete!");
+ logger.debug("Profile is to delete!");
persistenceService.remove(existingProfile.getItemId(), Profile.class);
return true;
}
List<String> propertiesToOverwrite = profileToImport.getPropertiesToOverwrite();
if (profileToImport.isOverwriteExistingProfiles() && propertiesToOverwrite != null && propertiesToOverwrite.size() > 0) { // We overwrite only properties marked to overwrite
- logger.info("Properties to overwrite: {}", propertiesToOverwrite);
+ logger.debug("Properties to overwrite: {}", propertiesToOverwrite);
for (String propName : propertiesToOverwrite) {
existingProfile.getProperties().put(propName, profileToImport.getProperties().get(propName));
}
} else { //If no property is marked to overwrite we replace the whole properties map
- logger.info("Overwrite all properties");
+ logger.debug("Overwrite all properties");
existingProfile.setProperties(profileToImport.getProperties());
}
//update segments and scores
existingProfile.setSegments(profileToImport.getSegments());
existingProfile.setScores(profileToImport.getScores());
} else if (existingProfiles.size() == 0 && !profileToImport.isProfileToDelete()) {
- logger.info("New profile to add...");
+ logger.debug("New profile to add...");
BeanUtils.copyProperties(existingProfile, profileToImport);
} else {
logger.warn("{} occurences found for profile with {} = {}. Profile import is skipped", existingProfiles.size(),
profileToImport.getMergingProperty(), profileToImport.getProperties().get(profileToImport.getMergingProperty()).toString());
}
- logger.info("-------------------------------------");
+ logger.debug("-------------------------------------");
if (!profileToImport.isProfileToDelete()) {
return persistenceService.save(existingProfile, true);
} else {