This is an automated email from the ASF dual-hosted git repository. jkevan pushed a commit to branch logMore in repository https://gitbox.apache.org/repos/asf/unomi.git
commit ed683972e19ef55d5166fe97acc63b3591c9a547 Author: Kevan <[email protected]> AuthorDate: Tue Jan 5 10:44:40 2021 +0100 UNOMI-412: change some DEBUG log to WARN, ERROR or INFO --- .../unomi/router/core/processor/LineSplitFailureHandler.java | 2 +- .../unomi/router/core/route/ProfileImportToUnomiRouteBuilder.java | 2 +- .../org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java | 2 +- .../unomi/mailchimp/services/internal/MailChimpServiceImpl.java | 4 ++-- .../org/apache/unomi/graphql/commands/ProcessEventsCommand.java | 4 ++-- .../elasticsearch/ElasticSearchPersistenceServiceImpl.java | 2 +- .../conditions/ConditionESQueryBuilderDispatcher.java | 8 ++------ .../unomi/plugins/baseplugin/actions/IncrementInterestAction.java | 2 +- .../conditions/GeoLocationByPointSessionConditionEvaluator.java | 2 +- .../unomi/plugins/request/actions/SetRemoteHostInfoAction.java | 4 ++-- .../impl/cluster/ClusterSystemStatisticsEventHandler.java | 2 +- .../unomi/services/impl/definitions/DefinitionsServiceImpl.java | 2 +- .../org/apache/unomi/services/impl/events/EventServiceImpl.java | 2 +- wab/src/main/java/org/apache/unomi/web/ContextServlet.java | 4 +--- 14 files changed, 18 insertions(+), 24 deletions(-) diff --git a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/processor/LineSplitFailureHandler.java b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/processor/LineSplitFailureHandler.java index 7543e48..a7aeb1a 100644 --- a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/processor/LineSplitFailureHandler.java +++ b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/processor/LineSplitFailureHandler.java @@ -32,7 +32,7 @@ public class LineSplitFailureHandler implements Processor { private static final Logger logger = LoggerFactory.getLogger(LineSplitFailureHandler.class.getName()); public void process(Exchange exchange) throws Exception { - logger.debug("Route: {}, Error: {}", exchange.getProperty(Exchange.FAILURE_ROUTE_ID), exchange.getProperty(Exchange.EXCEPTION_CAUGHT)); + logger.error("Route: {}, Error: {}", exchange.getProperty(Exchange.FAILURE_ROUTE_ID), exchange.getProperty(Exchange.EXCEPTION_CAUGHT)); ImportLineError importLineError = new ImportLineError(); if (exchange.getProperty(Exchange.EXCEPTION_CAUGHT) instanceof BadProfileDataFormatException) { importLineError.setErrorCode(((BadProfileDataFormatException) exchange.getProperty(Exchange.EXCEPTION_CAUGHT)).getCause().getMessage()); diff --git a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/route/ProfileImportToUnomiRouteBuilder.java b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/route/ProfileImportToUnomiRouteBuilder.java index 9c5a876..8336bf8 100644 --- a/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/route/ProfileImportToUnomiRouteBuilder.java +++ b/extensions/router/router-core/src/main/java/org/apache/unomi/router/core/route/ProfileImportToUnomiRouteBuilder.java @@ -58,7 +58,7 @@ public class ProfileImportToUnomiRouteBuilder extends RouterAbstractRouteBuilder .unmarshal(jacksonDataFormat) .process(unomiStorageProcessor) .otherwise() - .log(LoggingLevel.DEBUG, "Failed message, skip processing!") + .log(LoggingLevel.WARN, "Failed message, skip processing!") .end() .aggregate(constant(true), new ArrayListAggregationStrategy()) .completionPredicate(exchangeProperty("CamelSplitComplete").isEqualTo("true")) diff --git a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java index 6f7a92a..fb5fbd8 100644 --- a/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java +++ b/extensions/salesforce-connector/services/src/main/java/org/apache/unomi/sfdc/services/internal/SFDCServiceImpl.java @@ -370,7 +370,7 @@ public class SFDCServiceImpl implements SFDCService { sfdcLeadFields.put(consentSfdcId, consentValue); logger.debug("Consent {} with value {} was mapped with {}", consentUnomiId, consentValue, consentSfdcId); } else { - logger.debug("Consent {} not found in current profile or not answered yet", consentUnomiId); + logger.warn("Consent {} not found in current profile or not answered yet", consentUnomiId); } } } diff --git a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java index a704f99..28de325 100644 --- a/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java +++ b/extensions/unomi-mailchimp/services/src/main/java/org/apache/unomi/mailchimp/services/internal/MailChimpServiceImpl.java @@ -301,10 +301,10 @@ public class MailChimpServiceImpl implements MailChimpService { || StringUtils.isBlank(mergeFields.getJSONObject(mcTagName).get(CITY).toString()) || StringUtils.isBlank(mergeFields.getJSONObject(mcTagName).get(COUNTRY).toString()))) { mergeFields.remove(mcTagName); - logger.debug("Can't map the address property {}, one of the mandatory field is missing (addr1, zip, city, country)", mcTagName); + logger.warn("Can't map the address property {}, one of the mandatory field is missing (addr1, zip, city, country)", mcTagName); } } else { - logger.debug("Found property {} in MC list, if you need this property please update mapping or add the property to your MC list", mcTagName); + logger.warn("Found property {} in MC list, if you need this property please update mapping or add the property to your MC list", mcTagName); } } } diff --git a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/commands/ProcessEventsCommand.java b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/commands/ProcessEventsCommand.java index 49a9107..d373874 100644 --- a/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/commands/ProcessEventsCommand.java +++ b/graphql/cxs-impl/src/main/java/org/apache/unomi/graphql/commands/ProcessEventsCommand.java @@ -104,7 +104,7 @@ public class ProcessEventsCommand extends BaseCommand<Integer> { } } catch (Exception e) { - LOG.debug("Process field {} is failed", eventProcessor.getFieldName(), e); + LOG.warn("Process field " + eventProcessor.getFieldName() + " is failed", e); } }); } @@ -115,7 +115,7 @@ public class ProcessEventsCommand extends BaseCommand<Integer> { try { processField(fieldDefinition, eventInputAsMap); } catch (Exception e) { - LOG.debug("Process field {} is failed", fieldDefinition, e); + LOG.warn("Process field " + fieldDefinition + " is failed", e); } } }); diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java index 9a1e6b1..14c8435 100644 --- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java +++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java @@ -1053,7 +1053,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService, final BulkResponse deleteResponse = client.bulk(deleteByScopeBulkRequest, RequestOptions.DEFAULT); if (deleteResponse.hasFailures()) { // do something - logger.debug("Couldn't remove by query " + query + ":\n{}", deleteResponse.buildFailureMessage()); + logger.warn("Couldn't remove by query " + query + ":\n{}", deleteResponse.buildFailureMessage()); } } diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/conditions/ConditionESQueryBuilderDispatcher.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/conditions/ConditionESQueryBuilderDispatcher.java index 56b280e..be2535c 100644 --- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/conditions/ConditionESQueryBuilderDispatcher.java +++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/conditions/ConditionESQueryBuilderDispatcher.java @@ -86,9 +86,7 @@ public class ConditionESQueryBuilderDispatcher { } // if no matching - if (logger.isDebugEnabled()) { - logger.debug("No matching query builder for condition {} and context {}", condition, context); - } + logger.warn("No matching query builder for condition {} and context {}", condition, context); return QueryBuilders.matchAllQuery(); } @@ -120,9 +118,7 @@ public class ConditionESQueryBuilderDispatcher { } // if no matching - if (logger.isDebugEnabled()) { - logger.debug("No matching query builder for condition {} and context {}", condition, context); - } + logger.warn("No matching query builder for condition {} and context {}", condition, context); throw new UnsupportedOperationException(); } } diff --git a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/IncrementInterestAction.java b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/IncrementInterestAction.java index 0d693b4..0c29823 100644 --- a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/IncrementInterestAction.java +++ b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/actions/IncrementInterestAction.java @@ -82,7 +82,7 @@ public class IncrementInterestAction implements ActionExecutor { profileInterestsMap.put(topicId, value); } else { - LOG.debug("The interest with key \"{}\" was not recalculated for profile with itemId \"{}\" ", topicId, profile.getItemId()); + LOG.warn("The interest with key \"{}\" was not recalculated for profile with itemId \"{}\" ", topicId, profile.getItemId()); } }); diff --git a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/GeoLocationByPointSessionConditionEvaluator.java b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/GeoLocationByPointSessionConditionEvaluator.java index 8de237b..6e798a3 100644 --- a/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/GeoLocationByPointSessionConditionEvaluator.java +++ b/plugins/baseplugin/src/main/java/org/apache/unomi/plugins/baseplugin/conditions/GeoLocationByPointSessionConditionEvaluator.java @@ -61,7 +61,7 @@ public class GeoLocationByPointSessionConditionEvaluator implements ConditionEva } } } catch (Exception e) { - logger.debug("Cannot get properties", e); + logger.warn("Cannot evaluate condition, properties 'properties.location.lat' or 'properties.location.lon' not found"); } return false; } diff --git a/plugins/request/src/main/java/org/apache/unomi/plugins/request/actions/SetRemoteHostInfoAction.java b/plugins/request/src/main/java/org/apache/unomi/plugins/request/actions/SetRemoteHostInfoAction.java index 02c6f53..9e60118 100644 --- a/plugins/request/src/main/java/org/apache/unomi/plugins/request/actions/SetRemoteHostInfoAction.java +++ b/plugins/request/src/main/java/org/apache/unomi/plugins/request/actions/SetRemoteHostInfoAction.java @@ -232,7 +232,7 @@ public class SetRemoteHostInfoAction implements ActionExecutor { } return true; } catch (IOException | GeoIp2Exception e) { - logger.debug("Cannot resolve IP", e); + logger.warn("Cannot resolve IP", e); } return false; } @@ -243,7 +243,7 @@ public class SetRemoteHostInfoAction implements ActionExecutor { try { addr = InetAddress.getByName(remoteAddr); } catch (UnknownHostException e) { - logger.debug("Cannot resolve IP", e); + logger.warn("Cannot resolve IP", e); return false; } // Check if the address is a valid special local or loop back diff --git a/services/src/main/java/org/apache/unomi/services/impl/cluster/ClusterSystemStatisticsEventHandler.java b/services/src/main/java/org/apache/unomi/services/impl/cluster/ClusterSystemStatisticsEventHandler.java index 39b21af..ac0488d 100644 --- a/services/src/main/java/org/apache/unomi/services/impl/cluster/ClusterSystemStatisticsEventHandler.java +++ b/services/src/main/java/org/apache/unomi/services/impl/cluster/ClusterSystemStatisticsEventHandler.java @@ -71,7 +71,7 @@ public class ClusterSystemStatisticsEventHandler extends CellarSupport implement // check if the group is local if (!groupManager.isLocalGroup(event.getSourceGroup().getName())) { - logger.debug("CELLAR SYSTEM STATS: node is not part of the event cluster group {}",event.getSourceGroup().getName()); + logger.info("CELLAR SYSTEM STATS: node is not part of the event cluster group {}",event.getSourceGroup().getName()); return; } diff --git a/services/src/main/java/org/apache/unomi/services/impl/definitions/DefinitionsServiceImpl.java b/services/src/main/java/org/apache/unomi/services/impl/definitions/DefinitionsServiceImpl.java index 6ce18c1..cf4d4c1 100644 --- a/services/src/main/java/org/apache/unomi/services/impl/definitions/DefinitionsServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/impl/definitions/DefinitionsServiceImpl.java @@ -268,7 +268,7 @@ public class DefinitionsServiceImpl implements DefinitionsService, SynchronousBu valueTypeByTag.put(tag, valueTypes); } else { // we found a tag that is not defined, we will define it automatically - logger.debug("Unknown tag " + tag + " used in property type definition " + predefinedPropertyURL); + logger.warn("Unknown tag " + tag + " used in property type definition " + predefinedPropertyURL); } } } catch (Exception e) { diff --git a/services/src/main/java/org/apache/unomi/services/impl/events/EventServiceImpl.java b/services/src/main/java/org/apache/unomi/services/impl/events/EventServiceImpl.java index 3f5cd23..e268d8e 100644 --- a/services/src/main/java/org/apache/unomi/services/impl/events/EventServiceImpl.java +++ b/services/src/main/java/org/apache/unomi/services/impl/events/EventServiceImpl.java @@ -149,7 +149,7 @@ public class EventServiceImpl implements EventService { } } } - logger.debug("Could not authenticate any third party servers"); + logger.warn("Could not authenticate any third party servers for key: {}", key); } return null; } diff --git a/wab/src/main/java/org/apache/unomi/web/ContextServlet.java b/wab/src/main/java/org/apache/unomi/web/ContextServlet.java index 82fe666..f45a891 100644 --- a/wab/src/main/java/org/apache/unomi/web/ContextServlet.java +++ b/wab/src/main/java/org/apache/unomi/web/ContextServlet.java @@ -314,9 +314,7 @@ public class ContextServlet extends HttpServlet { String masterProfileId = profile.getMergedWith(); Profile masterProfile = profileService.load(masterProfileId); if (masterProfile != null) { - if (logger.isDebugEnabled()) { - logger.debug("Current profile was merged with profile {}, replacing profile in session", masterProfileId); - } + logger.info("Current profile {} was merged with profile {}, replacing profile in session", currentProfile.getItemId(), masterProfileId); profile = masterProfile; if (session != null) { session.setProfile(profile);
