[jira] [Commented] (LOG4NET-556) Rolling file appender only recognises dates in yyyy-MM-dd format.

2017-03-09 Thread Stefan Bodewig (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4NET-556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15903339#comment-15903339
 ] 

Stefan Bodewig commented on LOG4NET-556:


Thanks Steven, I guess I've gotten carried away by my frustration with 
{{RollingFileAppender}} combined with my lack of time.

Your patch probably works for most cases - more cases than the current code 
does. Maybe we can just add a little extra safety net.

> Rolling file appender only recognises dates in -MM-dd format.
> -
>
> Key: LOG4NET-556
> URL: https://issues.apache.org/jira/browse/LOG4NET-556
> Project: Log4net
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.0.7
> Environment: Windows 7 and 10.
>Reporter: Steven Nicholas
>Priority: Minor
>  Labels: RollingFileAppender, fix
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> Rolling file appender wouldn't recognise date format if it differed from 
> yyy-MM-dd in the config file and would roll to the next file for every logged 
> event, leading to thousands of files with the suffix MMdd-xxx.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (LOG4NET-556) Rolling file appender only recognises dates in yyyy-MM-dd format.

2017-03-08 Thread Steven Nicholas (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4NET-556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15902621#comment-15902621
 ] 

Steven Nicholas commented on LOG4NET-556:
-

Thanks Stefan.
Hmm, i'll just stick with my change for now and see if i get a chance in 
between projects to have a look at all the permutations around using date as 
you suggest.

Cheers

Steven

> Rolling file appender only recognises dates in -MM-dd format.
> -
>
> Key: LOG4NET-556
> URL: https://issues.apache.org/jira/browse/LOG4NET-556
> Project: Log4net
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.0.7
> Environment: Windows 7 and 10.
>Reporter: Steven Nicholas
>Priority: Minor
>  Labels: RollingFileAppender, fix
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> Rolling file appender wouldn't recognise date format if it differed from 
> yyy-MM-dd in the config file and would roll to the next file for every logged 
> event, leading to thousands of files with the suffix MMdd-xxx.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (LOG4NET-556) Rolling file appender only recognises dates in yyyy-MM-dd format.

2017-03-08 Thread Stefan Bodewig (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4NET-556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15901150#comment-15901150
 ] 

Stefan Bodewig commented on LOG4NET-556:


Many thanks, Steven

Oh my. {{RollingFileAppender}} really is broken in so many ways that small 
patches threaten it to fall apart. I flinch every time I have to touch it. 
LOG4NET-557

That being said, your patch deals one assumption (the pattern will always 
contain -MM-DD) for another (if the parsed backup index is bigger than the 
largest configured, it really must be a date). Your assumption is probably 
closer to the truth than the current code, but there are edge cases like backup 
files created with an older configuration that allowed for a bigger 
{{maxSizeRollBackups}}.

There already is a comment in {{RollingFileAppender}} 

{code}
// caution: we might get a false positive when certain
// date patterns such as MMdd are used...those are
// valid number but aren't the kind of back up index
// we're looking for
{code}

but I don't see anything that would handle this. I'd prefer code that dealt 
with the potential "false positives" to go into {{InitializeFromOneFile}} 
rather than having {{GetBackupIndex}} "lie".


> Rolling file appender only recognises dates in -MM-dd format.
> -
>
> Key: LOG4NET-556
> URL: https://issues.apache.org/jira/browse/LOG4NET-556
> Project: Log4net
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.0.7
> Environment: Windows 7 and 10.
>Reporter: Steven Nicholas
>Priority: Minor
>  Labels: fix
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> Rolling file appender wouldn't recognise date format if it differed from 
> yyy-MM-dd in the config file and would roll to the next file for every logged 
> event, leading to thousands of files with the suffix MMdd-xxx.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (LOG4NET-556) Rolling file appender only recognises dates in yyyy-MM-dd format.

2017-03-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/LOG4NET-556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15900855#comment-15900855
 ] 

ASF GitHub Bot commented on LOG4NET-556:


GitHub user Snotface opened a pull request:

https://github.com/apache/log4net/pull/43

LOG4NET-556 - Allow for dates that aren't necessarily in the -MM-dd 
format.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/Snotface/log4net trunk

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/log4net/pull/43.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #43


commit ee948d16ed620b6e2c77881c0ace528556c0bb0a
Author: Steven Nicholas 
Date:   2017-03-08T07:08:26Z

Allow for dates that aren't necessarily in the -MM-dd format.




> Rolling file appender only recognises dates in -MM-dd format.
> -
>
> Key: LOG4NET-556
> URL: https://issues.apache.org/jira/browse/LOG4NET-556
> Project: Log4net
>  Issue Type: Bug
>  Components: Appenders
>Affects Versions: 2.0.7
> Environment: Windows 7 and 10.
>Reporter: Steven Nicholas
>Priority: Minor
>  Labels: fix
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> Rolling file appender wouldn't recognise date format if it differed from 
> yyy-MM-dd in the config file and would roll to the next file for every logged 
> event, leading to thousands of files with the suffix MMdd-xxx.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)