Re: ComponentLog and JUnit

2017-09-27 Thread Ryan H
I've done some more digging with mvn dependency:tree. It looks like a jar I'm importing in my pom includes logback-classic, version 1.0.9, at the compile scope. The exceptions I'm getting is likely due to it being an old version of logback-classic. Notably, the logback-classic in the jar I'm

Re: ComponentLog and JUnit

2017-09-27 Thread Ryan H
*tl;dr:* When using TestRunner, I can only get logging to log to the console/standard out when logback-classic is present in the test-scope. Is it safe to say that NiFi, when using the TestRunner, requires logback-classic to be present in the test scope in the pom.xml? I've got my stuff

Re: ComponentLog and JUnit

2017-09-27 Thread Bryan Bende
I think another option is to use the simple SLF4J logger org.slf4j slf4j-simple test Then you probably wouldn't need the logback.xml file since you wouldn't be logging through logback at that point. On Wed, Sep 27, 2017 at 10:40 AM, Ryan H wrote:

Re: ComponentLog and JUnit

2017-09-27 Thread Ryan H
I figured it out... I was missing the logback-test.xml file (now included) and in my pom.xml: I had: ch.qos.logback logback-*core* test Instead I swapped to: ch.qos.logback logback-*classic* test And the logs are outputting now. Ryan On Wed, Sep 27, 2017 at 10:20 AM,

Re: ComponentLog and JUnit

2017-09-27 Thread Ryan H
Hi Andy, It's a custom processor I'm writing. I was scratching my head wondering if that is it, or adding a test dependency for logback has something to do with it. I just copy/pasted this one:

Re: ComponentLog and JUnit

2017-09-26 Thread Andy LoPresto
Ryan, Which module is this running in? Some modules have a logback.xml file defined in /src/test/resources/logback.xml which configures the test loggers, while others do not. If this is not configured in your module, you won’t see the error messages on the console. You can copy an existing

ComponentLog and JUnit

2017-09-26 Thread Ryan H
Hi, I'm curious if there's a way to get the ComponentLog to output to StandardOut during a Unit Test. I see I can access them when I call testRunner.getLogger().getErrorMessages(), however, I'd really like to see a stacktrace if it happens without having to iterate through an array to find