cjbhaines / Log4Net.Async

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

does it work with log4net 1.2.15.0 ? #27

Closed KamranShahid closed 8 years ago

KamranShahid commented 8 years ago

does it work with log4net 1.2.15.0 ? My application is logging nothing

KamranShahid commented 8 years ago

I were able to log after i compile Log4Net.Async dll with newer version of log4net and then adding in my rolling file appender

Only thing i am seeing is that logs entries were written instantly in log file even though i have put buffersize to 200 Thanks

cjbhaines commented 8 years ago

Log4Net.Async is compiled against NuGet package 2.0.3 (1.2.13.0) and the latest package is 2.0.5 (version 1.2.15.0). As long as there are no breaking changes in their API (which there won't be because they didn't bump the major version) it will work fine. I've just run the tests against 2.0.5 and it works fine suggesting it works.

The logs should be written instantly to the log file assuming you are not calling Log faster than the appender can keep up with. What exactly were you expecting?

KamranShahid commented 8 years ago

Actually by buffersize my thinking were that it will store till 200 entries somewhere in memory. then will output to the file. That's how there will be less I/O and might be a performance gain. Like adonetappender buffersize property. About version I will have to check again what nugetpackage i have downloaded a month or so ago.

rcollette commented 8 years ago

@KamranShahid - What you are referring to is BufferringForwardingAppender. See: https://logging.apache.org/log4net/release/config-examples.html

This can be used with other appenders, including this one. There is no need to re-implement that behavior in these appenders.

cjbhaines commented 8 years ago

@KamranShahid, as Richard says this is not the intention of this library. The forwarders will write to the underlying appenders as fast as they can, using only a single thread to do so. This library is used to speed up calling code that needs to log so that it does not have to wait for things like file access, database access, etc.

KamranShahid commented 8 years ago

Acknowledged Richard and Chris.