Re: MaxHistoryNot Worked in logback-1.2.3?

2017-07-19 Thread prabhu Mahendran
Hi Aldrin,

Thanks for your response.

i wants to keep only 5 files each file should having  size 100KB. If total
size of the files reaches 500KB then it will delete oldest file and then
write new file.

I have tried SizeAndTimeBasedPolicy then it couldn't preferable for me to
use with respect to my requirement.

According to that need which rolling policy would you recommend me to use
in NiFi?

Thanks,
Mahendran


Re: MaxHistoryNot Worked in logback-1.2.3?

2017-07-18 Thread Aldrin Piri
I think the comment in the config XML may be a bit misleading.  Looking
through the docs, it appears your configuration would keep 2 days of log
files given your filename format leading to daily logs.

Your max size of 100kB will cause rollover, incrementing the value
represented by %i.  With this configuration, I would expect no more than
two unique days of data, but an unbounded number of 100kB incremental logs
for each of those two days.

Doing some searching it seems to be a recurring problem with some bugginess
[2], but seems like you may want to evaluate the totalSizeCap [3] to lock
down the overall size.


[1] https://logback.qos.ch/manual/appenders.html#tbrpMaxHistory
[2] https://jira.qos.ch/browse/LOGBACK-747
[3] https://logback.qos.ch/manual/appenders.html#tbrpTotalSizeCap


On Mon, Jul 17, 2017 at 5:28 AM, prabhu Mahendran 
wrote:

> I have tried below code to write logs based on SizeAndTimeBasedRollingPoli
> cy.
>
> In that i can able to write files with respect to file size 100KB but not
> able to maintain only 2 maxHistory files.It always write new file after
> 100KB successfully written.
>
> Now i have using NiFI-1.3.0 which having logback version 1.2.3 for core
> and classic jars.
>
>
> 
>
> 
>
>   ${org.apache.nifi.bootstrap.config.log.dir}
> /nifi-app_%d{-MM-dd}.%i.log
>
> 100 KB
>
> 
>
>2
>
>true
>
>
>
> 
>
> 
>
> %date %level [%thread] %logger{40} %msg%n
>
> 
>
> 
>
>
>
> I have faced like issue that may belongs to below task.
>
> https://jira.qos.ch/browse/LOGBACK-162
>
> I have used NiFi-1.3.0 it only uses logback 1.2.3.
>
> In NiFi i have found one jira for upgrade logback.
>
> https://issues.apache.org/jira/browse/NIFI-3699
>
> I think logback latest version is 1.2.3. Here it seems MaxHistory property
> doesn't work.
>
> Am i missing anythink?
>
> Can anyone suggest me to solve this?
>


MaxHistoryNot Worked in logback-1.2.3?

2017-07-17 Thread prabhu Mahendran
I have tried below code to write logs based on SizeAndTimeBasedRollingPolicy
.

In that i can able to write files with respect to file size 100KB but not
able to maintain only 2 maxHistory files.It always write new file after
100KB successfully written.

Now i have using NiFI-1.3.0 which having logback version 1.2.3 for core and
classic jars.







${org.apache.nifi.bootstrap.config.log.dir}/nifi-app_%d{-MM-dd}.%i.log

100 KB



   2

   true







%date %level [%thread] %logger{40} %msg%n







I have faced like issue that may belongs to below task.

https://jira.qos.ch/browse/LOGBACK-162

I have used NiFi-1.3.0 it only uses logback 1.2.3.

In NiFi i have found one jira for upgrade logback.

https://issues.apache.org/jira/browse/NIFI-3699

I think logback latest version is 1.2.3. Here it seems MaxHistory property
doesn't work.

Am i missing anythink?

Can anyone suggest me to solve this?