Buffered logging
Log to a buffer (in memory or in isolated storage) and publish to a selected sink once the buffer is full or enough time has elapsed.
Async wrapper now included in EntLib v6
-
Steve Powell commented
I too would love a buffered logging listener or a buffer I could insert before the listener instance. I've implemented my own buffered listener at at least 3 different Fortune 500 companies. NLog has a simple bufferning mechanism. Re data loss: has not been a significant issue and a risk that I am willing to take; since it is logging after all.
-
Yes, data loss is a concern. That's why we never implemented it before. But people keep asking for it, especially when logging non-critical messages.
-
Sebastian Weber commented
Sounds interesting but how would you avoid data loss when the buffer fails?