Splat Contrib is a small library aimed at providing some extensions to the excellent Splat library by Paul Betts.
- Provide logic for Feature Usage Tracking in Applications
- Provide logging extensions that allow Func<string> to be passed in and only be evaluated if the relevant logging level is enabled.
- Look to feed contributions back to the main splat project once they've reached a point of maturity.
Step 1. Install Splat Contrib via the NuGet package: Splat.Contrib
PM> Install-Package Splat.Contrib
Viewing the documentation
These methods are extensions to the current Splat logging mechanism. They simply need you to change your logging methods to pass a Func<string> \ Lambda into them.
// These are extension methods so at the top of your .cs file you will need using Splat; // then utilise the extension methods exactly the same way as you would the normal logging methods. this.Log().Debug(() => "Something that will only evaluate if the debug log level is enabled");
Feature Usage Tracking
Contributing to the code
1. Fork the code
2. Apply desired changes
Use your preffered method for carrying out work.