Dominik Psenner (JIRA | 3 Sep 08:31 2015
Picon

[jira] [Commented] (LOG4NET-27) Rolling files on date/time boundaries doesn't support a maximum number of backup files.


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

Dominik Psenner commented on LOG4NET-27:
----------------------------------------

The solution is not as simple as it may look because it is computationally hard to find the files that have
been rolled away and thus it is computationally hard to correctly calculate the maximum number of backup
files. If you need a maximum number of backup files, do not roll on datetime boundaries. This may be solved
with the reimplementation of the RollingFileAppender (LOG4NET-367), but that again won't be happening
any time soon. If you need this feature, best you could do is get involved and continue the work on the
reimplementation of the RollingFileAppender.

Cheers

> Rolling files on date/time boundaries doesn't support a maximum number of backup files.
> ---------------------------------------------------------------------------------------
>
>                 Key: LOG4NET-27
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-27
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Appenders
>    Affects Versions: 1.2.11
>            Reporter: Florian Ramillien
>            Priority: Minor
>             Fix For: 1.2 Maintenance Release
>
(Continue reading)

Tejas Shah (JIRA | 2 Sep 16:50 2015
Picon

[jira] [Commented] (LOG4NET-27) Rolling files on date/time boundaries doesn't support a maximum number of backup files.


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

Tejas Shah commented on LOG4NET-27:
-----------------------------------

Did anyone find a working path or solution for the same?

> Rolling files on date/time boundaries doesn't support a maximum number of backup files.
> ---------------------------------------------------------------------------------------
>
>                 Key: LOG4NET-27
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-27
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Appenders
>    Affects Versions: 1.2.11
>            Reporter: Florian Ramillien
>            Priority: Minor
>             Fix For: 1.2 Maintenance Release
>
>         Attachments: LOG4NET-27.patch, RollingFileAppender.cs, RollingFileAppender.cs,
RollingFileAppender.cs, RollingFileAppender.cs.patch, RollingFileAppender.patch,
RollingFileAppender.zip, appender_diff, rollingfileappender.diff
>
>
> A maximum of backup files exist when rolling files on file size, but not for rolling on date/time.
> This can be implemented with the same config key : MaxSizeRollBackups
(Continue reading)

Albin Sunnanbo (JIRA | 30 Aug 10:43 2015
Picon

[jira] [Commented] (LOG4NET-472) Contribution of BurstFilter


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

Albin Sunnanbo commented on LOG4NET-472:
----------------------------------------

BTW, are there some documents that require manual updates, like 
https://logging.apache.org/log4net/release/sdk/index.html
https://logging.apache.org/log4net/release/config-examples.html
etc?
I guess the SmtpAppender section in config-examples could be updated with an example with the BurstFilter.

> Contribution of BurstFilter
> ---------------------------
>
>                 Key: LOG4NET-472
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-472
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Other
>    Affects Versions: 1.2.13
>            Reporter: Albin Sunnanbo
>            Priority: Minor
>
> Hi
> I wrote a BurstFilter implementation for Log4net a while ago, trying to mimic the API of BurstFilter for
Log4j https://logging.apache.org/log4j/2.0/log4j-core/apidocs/org/apache/logging/log4j/core/filter/BurstFilter.html
> I have published my source code on our company GitHub account: 
(Continue reading)

Albin Sunnanbo (JIRA | 30 Aug 09:41 2015
Picon

[jira] [Commented] (LOG4NET-472) Contribution of BurstFilter


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

Albin Sunnanbo commented on LOG4NET-472:
----------------------------------------

If it would help I can fix up namespaces and provide a patch for the log4net-1.2.x branch in SVN

> Contribution of BurstFilter
> ---------------------------
>
>                 Key: LOG4NET-472
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-472
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Other
>    Affects Versions: 1.2.13
>            Reporter: Albin Sunnanbo
>            Priority: Minor
>
> Hi
> I wrote a BurstFilter implementation for Log4net a while ago, trying to mimic the API of BurstFilter for
Log4j https://logging.apache.org/log4j/2.0/log4j-core/apidocs/org/apache/logging/log4j/core/filter/BurstFilter.html
> I have published my source code on our company GitHub account: 
> https://github.com/KentorIT/Log4NetExtensions
> But I would of course be happy to contribute the extension back to the main project on apache.org.
> Would a contribution be accepted and in such case how would you like the contribution served? As a diff in
this Jira issue?
(Continue reading)

Dominik Psenner (JIRA | 30 Aug 08:32 2015
Picon

[jira] [Comment Edited] (LOG4NET-472) Contribution of BurstFilter


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

Dominik Psenner edited comment on LOG4NET-472 at 8/30/15 6:32 AM:
------------------------------------------------------------------

You're welcome and thanks for the contribution. I'll try a merge when I find some spare time.

was (Author: nachbarslumpi):
You're welcome and thanks for the addition. I'll try a merge when I find some spare time.

> Contribution of BurstFilter
> ---------------------------
>
>                 Key: LOG4NET-472
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-472
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Other
>    Affects Versions: 1.2.13
>            Reporter: Albin Sunnanbo
>            Priority: Minor
>
> Hi
> I wrote a BurstFilter implementation for Log4net a while ago, trying to mimic the API of BurstFilter for
Log4j https://logging.apache.org/log4j/2.0/log4j-core/apidocs/org/apache/logging/log4j/core/filter/BurstFilter.html
> I have published my source code on our company GitHub account: 
> https://github.com/KentorIT/Log4NetExtensions
(Continue reading)

Dominik Psenner (JIRA | 30 Aug 08:31 2015
Picon

[jira] [Commented] (LOG4NET-472) Contribution of BurstFilter


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

Dominik Psenner commented on LOG4NET-472:
-----------------------------------------

You're welcome and thanks for the addition. I'll try a merge when I find some spare time.

> Contribution of BurstFilter
> ---------------------------
>
>                 Key: LOG4NET-472
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-472
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Other
>    Affects Versions: 1.2.13
>            Reporter: Albin Sunnanbo
>            Priority: Minor
>
> Hi
> I wrote a BurstFilter implementation for Log4net a while ago, trying to mimic the API of BurstFilter for
Log4j https://logging.apache.org/log4j/2.0/log4j-core/apidocs/org/apache/logging/log4j/core/filter/BurstFilter.html
> I have published my source code on our company GitHub account: 
> https://github.com/KentorIT/Log4NetExtensions
> But I would of course be happy to contribute the extension back to the main project on apache.org.
> Would a contribution be accepted and in such case how would you like the contribution served? As a diff in
this Jira issue?
(Continue reading)

Albin Sunnanbo (JIRA | 29 Aug 20:39 2015
Picon

[jira] [Commented] (LOG4NET-472) Contribution of BurstFilter


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

Albin Sunnanbo commented on LOG4NET-472:
----------------------------------------

By introducing a temporary Thread.Sleep I found the lock in
log4net.Appender.AppenderSkeleton.DoAppend sorted out any concurrency before calling the filters.
I have now removed the locking too.
Thanks for your time and knowledge about the expected flow in Log4Net.

> Contribution of BurstFilter
> ---------------------------
>
>                 Key: LOG4NET-472
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-472
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Other
>    Affects Versions: 1.2.13
>            Reporter: Albin Sunnanbo
>            Priority: Minor
>
> Hi
> I wrote a BurstFilter implementation for Log4net a while ago, trying to mimic the API of BurstFilter for
Log4j https://logging.apache.org/log4j/2.0/log4j-core/apidocs/org/apache/logging/log4j/core/filter/BurstFilter.html
> I have published my source code on our company GitHub account: 
> https://github.com/KentorIT/Log4NetExtensions
(Continue reading)

Albin Sunnanbo (JIRA | 29 Aug 20:22 2015
Picon

[jira] [Commented] (LOG4NET-472) Contribution of BurstFilter


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

Albin Sunnanbo commented on LOG4NET-472:
----------------------------------------

I got rid of the {{+ 1}}.

Regarding the lock I'm not familiar enough with the internals of Log4Net. If you log from different threads
in your application, are the log events processed internally in sequence by a single thread? In such case
it could be removed.

I trust Eric Lippert that uncontended locks are very cheap [(about 10 nano
seconds)|http://stackoverflow.com/a/19384758/401728] and thought better safe than sorry.

I'll see if I can whip up a conclusive test.

> Contribution of BurstFilter
> ---------------------------
>
>                 Key: LOG4NET-472
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-472
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Other
>    Affects Versions: 1.2.13
>            Reporter: Albin Sunnanbo
>            Priority: Minor
(Continue reading)

Dominik Psenner (JIRA | 28 Aug 22:00 2015
Picon

[jira] [Commented] (LOG4NET-472) Contribution of BurstFilter


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

Dominik Psenner commented on LOG4NET-472:
-----------------------------------------

Oh, and another thing crossed my mind:

Locking may cause a lot of overhead and thus performance. Have you tested if it is really needed? Typically,
an appender should run on the same thread but this needs further testing and I would kindly ask you to do that
if you would not mind.

> Contribution of BurstFilter
> ---------------------------
>
>                 Key: LOG4NET-472
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-472
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Other
>    Affects Versions: 1.2.13
>            Reporter: Albin Sunnanbo
>            Priority: Minor
>
> Hi
> I wrote a BurstFilter implementation for Log4net a while ago, trying to mimic the API of BurstFilter for
Log4j https://logging.apache.org/log4j/2.0/log4j-core/apidocs/org/apache/logging/log4j/core/filter/BurstFilter.html
> I have published my source code on our company GitHub account: 
(Continue reading)

Dominik Psenner (JIRA | 28 Aug 21:59 2015
Picon

[jira] [Commented] (LOG4NET-472) Contribution of BurstFilter


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

Dominik Psenner commented on LOG4NET-472:
-----------------------------------------

That's great! Just looked at the implementation and it looks both good and simple. As a last thing I would change:

if (queuedEvents.Count + 1 > BurstSize)

with:

if (queuedEvents.Count > BurstSize)

to save an operation.

> Contribution of BurstFilter
> ---------------------------
>
>                 Key: LOG4NET-472
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-472
>             Project: Log4net
>          Issue Type: New Feature
>          Components: Other
>    Affects Versions: 1.2.13
>            Reporter: Albin Sunnanbo
>            Priority: Minor
>
(Continue reading)

Danilo Bassan | 27 Aug 14:15 2015
Picon

info


Gmane