Low impact logging
With the help of tasks in .net 4.0 we can now easily write logging code doesn't block the rest of our application; helping to reduce the impact of logging to the barest minimum.
And it is as simple as:
Task.Factory.StartNew(() => {
// logging code
});
This will allow the logging code to finish executing asynchronously in parallel without holding up the execution of the rest of the code.
Written by Chris Pebble
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#.net
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#