Hi Farhan,

it's great to see your interest in the logging framework log4net. I'm commenting inline below ..

On 2018-12-13 23:31, Farhan Nasim wrote:
Have encountered a scenario in many projects where log files covering only
a last user specified period is needed (e.g. last 5 days, last 3 hours,
etc.) So far, Log4net doesn't provide any such appender out of the box; the
RollingFileAppender only supports backing up a number of last files
(maxSizeRollBackups).

This is a valid usecase.

1. I am writing an appender (made some progress in fact) that derives
from *RollingFileAppender
*and serves the purpose. It takes a string denoting a TimeSpan as parameter
and keeps files falling only in this period. It follows Log4net conventions
and it is tested for minutes to days periods. Is Log4net willing to include
any similar appender?

The RollingFileAppender is probably not the ideal base to start off your work. I already put effort into re-writing the RollingFileAppender where the rolling strategy is pluggable. Would you like to continue or derive from that work? The branch is feature/RollingFileAppender-NG [1]. Unfortunately I had so far not the time to complete this. We do observe that a major part of reported issues is related to the current implementation of the RollingFileAppender and would like to improve this situation. The next generation rolling file appender should probably only provide a subset of the functionality that its predecessor offered but should become more stable.

2. I need some critical feedbacks on naming and conventions. Am I supposed
to submit my changes as a pull request or have them discussed here?

A good place to discuss source code contributions is github in the form of a pull request. You'll also benefit from the continuous integration. Jenkins builds each pull requests and you can examine the build outputs etc. Please try to keep your pull requests short and concise to allow easy reviews.

[1] https://github.com/apache/logging-log4net/tree/feature/RollingFileAppender-NG

Reply via email to