Mark,
Sorry, just getting back to this. Thank you for responding. The upshot
is that customers/users of a NiFi flow can (still) modify
${NIFI_HOME}//conf/logback.xml/ in production to tailor the NiFi
ComponentLog to react to DEBUG, TRACE, etc.:
getLogger().[debug|trace|etc.]( "Log statement stuff..." );
but that isn't a workable solution for JUnit testing when modifying
*NiFi's component logger* is needed.
However, where not using NiFi's component logger, for example, this code
(imagine Foo.bar() as called from something in onTrigger()):
package com.windofkeltia.code;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Foo
{
private static final Logger logger = LoggerFactory.getLogger(
Foo.class );
public void bar()
{
logger.trace( "Calling bar() here..." );
}
}
...the use of a line in /src/test/resources/logback-test.xml/ like this
one appears to be effective:
<logger name="com.windofkeltia.code" level="TRACE" additivity="false">
<appender-ref ref="CONSOLE" />
<logger>
I have yet to solve the NiFi component log case (adding /slf4j-simple/
to /pom.xml/?), but will keep at it.
Thanks again!
Russ