Skip to content
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

Open
wants to merge 4 commits into
base: integration
Choose a base branch
from

Conversation

emiliodskinner
Copy link
Collaborator

No description provided.

@emiliodskinner emiliodskinner linked an issue Jan 16, 2025 that may be closed by this pull request
apmoriarty
apmoriarty previously approved these changes Jan 16, 2025
@@ -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()) {
Copy link
Collaborator

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()) {
Copy link
Collaborator

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()) {
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// 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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// if not warn.
// ; if not warn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Logging to SLF4j in warehouse module
4 participants