First, I'm using ControllerStatusReportingTask whose output I see in
*nifi-app.log.* This seems to do report what I want to see. However, I'd
like the status reports to go out to a different log file. I bounced NiFi
after enhancing the log-back file:

I inserted this near the top of *conf/logback.xml*, just after the
definition of the BOOTSTRAP_FILE rolling appender:

<!-- rolling appender for controller-status reporting task log. -->
<appender name="*CONTROLLER_STATUS_FILE*"
class="ch.qos.logback.core.rolling.RollingFileAppender">
  <file>logs/nifi-controller-status.log</file>
  <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
*
<fileNamePattern>./logs/nifi-controller-status_%d.log</fileNamePattern>*
    <maxHistory>30</maxHistory>
  </rollingPolicy>
  <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
    <pattern>%date %level [%thread] %logger{40} %msg%n</pattern>
  </encoder>
</appender>

...and I inserted this nearer the bottom of *conf/logback.xml:*

<!-- Logger to redirect controller status/reporting task output to a
different file. -->
<logger name="*org.apache.nifi.controller.ControllerStatusReportingTask*"
level="INFO" additivity="false">
  <appender-ref ref="*CONTROLLER_STATUS_FILE*" />
</logger>

The status still comes out in *nifi-app.log*;
*nifi-controller-status.log, *which
is created in the *logs* subdirectory, remains 0-length. What am I missing
here?

Thanks,
Russ

Reply via email to