There are a plenty of logging tools and options in todays market but the userful are some. Almost all of them if not some do work on similar baseline, a set of rules to route and a sink to put in the logs. Some are really cool but have lost their sharpness with the low or no community updates like log4net which had been a great library for logging almost anything with .net. Some other good stuff like in the “Microsoft.Practices” namespace are also good but do have a good learning curve.
At this point NLog comes out as a wonderful logger with lowest learning curve, fastest adaption, small footprint, async support, and a large set of targets that can fulfill almost all requirement. With these set of articles, I shall try to put how easy it is to employe the hardlifting of logging in your projects. For this post, we shall take out lovely Simple Console Application. The download link for sample code can be found at the end of the post. Also note we are not using any abstract or patterns, this is just to demonstrate a brief purpose.
So, We first created the the Default Console Application Project with all default settings. And the we did a nuget install for nlog. This shall install the latest version of the package to project.
Once we have this, we are pretty good to start. Second Step Continue reading