Skip to content

NIFI-12157 Remove nifi-logging-utils and NiFiLog#7826

Closed
exceptionfactory wants to merge 2 commits intoapache:mainfrom
exceptionfactory:NIFI-12157
Closed

NIFI-12157 Remove nifi-logging-utils and NiFiLog#7826
exceptionfactory wants to merge 2 commits intoapache:mainfrom
exceptionfactory:NIFI-12157

Conversation

@exceptionfactory
Copy link
Copy Markdown
Contributor

Summary

NIFI-12157 Removes the nifi-logging-utils module and replaces NiFiLog wrapper references with direct references to the standard SLF4J LoggerFactory used throughout the repository.

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 21

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

- Replaced NiFiLog references with direct references to SLF4J LoggerFactory
IOUtils.copy(bis, new NullOutputStream());
} catch (final IOException ioe) {
logger.info("Failed clearing out non-client response buffer due to: " + ioe, ioe);
logger.info("Failed clearing out non-client response buffer", ioe);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should avoid logging an exception at info level. In this case the output should be warn as it happening would be interesting to know why we weren't able to drain the response.

@@ -56,7 +55,7 @@ public class FileBasedClusterNodeFirewall implements ClusterNodeFirewall {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

On Line 105 for unknown host we should avoid including the exception. We know precisely why it was unknown and we're logging unknown host itself. In previous behavior the stack would not print without debug so this will preserve that plus intent anyway.

@exceptionfactory
Copy link
Copy Markdown
Contributor Author

Thanks for the detailed notes on those methods @joewitt, I made the proposed adjustments and pushed the changes.

@asfgit asfgit closed this in 19b4be4 Oct 2, 2023
@exceptionfactory exceptionfactory added the hacktoberfest-accepted Hacktoberfest Accepted label Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted Hacktoberfest Accepted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants