You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Andre F de Miranda (JIRA)" <ji...@apache.org> on 2017/07/16 05:09:00 UTC
[jira] [Commented] (NIFI-4189) NiFi ignores logback rotation
settings
[ https://issues.apache.org/jira/browse/NIFI-4189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16088811#comment-16088811 ]
Andre F de Miranda commented on NIFI-4189:
------------------------------------------
From what I understand, based on logback settings, NiFi default logback behavior is configured to behave so that once a file reaches the limits set in:
{code}
<maxFileSize>100MB</maxFileSize>
{code}
The {{%i}} set in:
{code}
<fileNamePattern>${org.apache.nifi.bootstrap.config.log.dir}/nifi-app_%d{yyyy-MM-dd_HH}.%i.log.gz</fileNamePattern>
{code}
Kicks in, creating a new file
This seems to disarm the expected behavior of rotating files for a maximum of X files as defined in:
{code}
<maxHistory>30</maxHistory>
{code}
In my tests, the best workaround seems to be increasing the size of
{code}
<maxFileSize>100MB</maxFileSize>
{code}
To a value that can hold a day worth of data.
Given the workaround above effectively disables rotation based on size - and in exchange restores a healthy logfile rotation - I suggest we adjust the default NiFi behavior so that:
1. we drop {{ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy}} for {{ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy}}
2. Remove both {{%i}} and {{maxFileSize}} from logback.xml
> NiFi ignores logback rotation settings
> --------------------------------------
>
> Key: NIFI-4189
> URL: https://issues.apache.org/jira/browse/NIFI-4189
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Andre F de Miranda
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)