-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
task-2628: Update Logging to SLF4j in datawave-warehouse/ingest-core pt1 #2696
base: integration
Are you sure you want to change the base?
Conversation
warehouse/ingest-core/src/main/java/datawave/ingest/data/config/ingest/BaseIngestHelper.java
Outdated
Show resolved
Hide resolved
warehouse/ingest-core/src/main/java/datawave/ingest/data/config/ingest/BaseIngestHelper.java
Outdated
Show resolved
Hide resolved
Co-authored-by: foster33 <[email protected]>
@@ -64,7 +65,9 @@ public String getNormalizedMaskedValue(final String key) { | |||
final Set<String> normalizedValues = normalizeFieldValue(fieldName.toUpperCase(), value); | |||
return normalizedValues.iterator().next(); | |||
} catch (final Exception ex) { | |||
log.warn(this.getType().typeName() + ": Unable to normalize masked value of '" + value + "' for " + fieldName, ex); | |||
if (log.isWarnEnabled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to output this regardless of if the warn level is enabled or not?
@@ -85,7 +86,9 @@ public EventFieldNormalizerHelper(Configuration config) { | |||
} else { | |||
typeFieldMap.put(fieldName, normalizer); | |||
} | |||
log.debug("Registered a " + normalizerClass + " for type[" + this.getType().typeName() + "], EVENT (not index) field[" + fieldName + "]"); | |||
if (log.isDebugEnabled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, just curious if this was too loud of a message before the refactor.
@@ -223,7 +224,9 @@ public NormalizedContentInterface normalize(NormalizedContentInterface field) { | |||
if (field.getEventFieldName().equals("IP_GEO_FM_COORDINATES") && field.getEventFieldValue().equals("-99.999/-999.999")) { | |||
log.warn("Found know bad default value: IP_GEO_FM_COORDINATES=-99.999/-999.999"); | |||
} else { | |||
log.error("Failed to normalize " + field.getEventFieldName() + '=' + field.getEventFieldValue(), e); | |||
if (log.isErrorEnabled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be worth considering outputting the error regardless of the conditional
@@ -45,11 +46,11 @@ public void run() { | |||
} | |||
|
|||
// verify that we're exeuting in a timely fashion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// verify that we're exeuting in a timely fashion | |
// verify that we're executing in a timely fashion; if not then send out a warning. |
try { | ||
tops.create(metadataTableName); | ||
} catch (TableExistsException tee) { | ||
log.error(metadataTableName + " already exists someone got here first"); | ||
log.error("{} already exists someone got here first", metadataTableName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.error("{} already exists someone got here first", metadataTableName); | |
log.error("{} already exists; someone got here first", metadataTableName); |
@@ -673,11 +676,11 @@ public void run() { | |||
} | |||
|
|||
// verify that we're exeuting in a timely fashion | |||
// ..if not warn. | |||
// if not warn. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// if not warn. | |
// ; if not warn. |
No description provided.