nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Gresock <jgres...@gmail.com>
Subject Logback stops writing to nifi-app.log after restart
Date Thu, 27 Oct 2016 12:34:49 GMT
Before I create a ticket, I wanted to see if anyone had run into this.

Whenever we restart nifi, the nifi-app.log no longer gets written to.

If I delete all the nifi-app* logs and then restart, it writes logs just
fine, but if I leave the logs it doesn't write to the log upon restarting
nifi.

Sure enough, "lsof | grep nifi-app" produces output prior to restart, but
produces nothing after a restart (if I have not deleted the logs).

An excerpt from my logback.xml:

<configuration scan="true" scanPeriod="30 seconds">
    <contextListener
class="ch.qos.logback.classic.jul.LevelChangePropagator">
        <resetJUL>true</resetJUL>
    </contextListener>

    <appender name="APP_FILE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>/opt/nifi/data/logs/nifi-app.log</file>
        <rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <!--
              For daily rollover, use 'app_%d.log'.
              For hourly rollover, use 'app_%d{yyyy-MM-dd_HH}.log'.
              To GZIP rolled files, replace '.log' with '.log.gz'.
              To ZIP rolled files, replace '.log' with '.log.zip'.
            -->

<fileNamePattern>/opt/nifi/data/logs/nifi-app_%d{yyyy-MM-dd_HH}.log</fileNamePattern>
            <timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
                <maxFileSize>100MB</maxFileSize>
            </timeBasedFileNamingAndTriggeringPolicy>
            <maxHistory>10</maxHistory>
        </rollingPolicy>
        <encoder
class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
            <pattern>%date %level [%thread] %logger{40} %msg%n</pattern>
            <immediateFlush>true</immediateFlush>
        </encoder>
    </appender>
    <root level="INFO">
        <appender-ref ref="APP_FILE"/>
    </root>
</configuration>


-- 
I know what it is to be in need, and I know what it is to have plenty.  I
have learned the secret of being content in any and every situation,
whether well fed or hungry, whether living in plenty or in want.  I can do
all this through him who gives me strength.    *-Philippians 4:12-13*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message