Russell,

There have been a couple of bugs in the logging for
ControllerStatusReportingTask (I am the perpetrator of one of them).
Depending on the version of NiFi you have, it is possible that your
logback.xml is correct, but that the actual logger name used by
ControllerStatusReportingTask does not match.

I recommend you check the actual name used in the log entries still being
logged to nifi-app.log.  You might also want to review NIFI-1738 for
details on the issue (https://issues.apache.org/jira/browse/NIFI-1738,
fixed in 0.7.0 and 1.0.0).

Thanks,

James




On Thu, Jul 14, 2016 at 10:02 AM, Russell Bateman <
[email protected]> wrote:

> 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