Github user markap14 commented on a diff in the pull request: https://github.com/apache/nifi/pull/165#discussion_r49469400 --- Diff: nifi-mock/src/main/java/org/apache/nifi/util/MockProcessorLog.java --- @@ -16,20 +16,57 @@ */ package org.apache.nifi.util; +import java.util.List; + import org.apache.nifi.logging.ProcessorLog; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class MockProcessorLog implements ProcessorLog { - private final Logger logger; + private final CapturingLogger logger; private final Object component; public MockProcessorLog(final String componentId, final Object component) { - this.logger = LoggerFactory.getLogger(component.getClass()); + this.logger = new CapturingLogger(LoggerFactory.getLogger(component.getClass())); --- End diff -- Can you explain why we have this CapturingLogger here, which implements many methods, rather than just modifying the existing warn(), error(), etc. methods? It seems that the capturing could happen within the MockProcessorLog, rather than at a lower level. I feel like this would result in much simpler code. But it's quite possible that I am missing something? Let me know what you think!
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---