Closed KamranShahid closed 8 years ago
I were able to log after i compile Log4Net.Async dll with newer version of log4net and then adding
Only thing i am seeing is that logs entries were written instantly in log file even though i have put buffersize to 200 Thanks
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?
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.
@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.
@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.
Acknowledged Richard and Chris.
does it work with log4net 1.2.15.0 ? My application is logging nothing