cjbhaines / Log4Net.Async

Asynchronous Log4Net appenders and forwarder
http://www.nuget.org/packages/Log4Net.Async/
MIT License
121 stars 37 forks source link

ParallelForwardingAppender doesn't concurrently rename/move files #42

Closed serialeatertwo closed 5 years ago

serialeatertwo commented 5 years ago

I'm using ParallelForwardingAppender to override a RollingFileAppender configured with and . While I noticed improved logging times in a simple loop over basic logging, I also noticed a delay when it's time to roll (rename) 100 backup files. Apparently the roll backup file processing is not being assigned to the parallel processing, which makes for a huge time hit on logging calls (about 3/4 of a second). Can this be fixed please? Who should I contact about this bug?

rcollette commented 5 years ago

I'm no longer contributing here as I have moved on to using Serilog.

ParallelForwardingAppender has no responsibility for the appenders it wraps. The same behavior you are seeing would be present if ParallelFowardingAppender were not used.

I'm not sure what scheme for file renaming you are using, but I wouldn't choose one that must rename all past files, but would rather something that either recycles the log names or simply deletes the oldest one and names a new one with a unique name (guid, date-time, etc.)

The issue is probably addressed better on StackOverflow.