There are many people out there that just love love love NLog and all it can do for us. NLog takes care of threading, logging levels and many other pieces to the logging out puzzle and packages in this nice little utility. NLog is supported on all Windows Frameworks.
If any of you out there have been using this tool in Visual Studio 2010 and have gotten used to the nlogger snippet, you may have a pouty face when you start using 2012 :(. NLog snippets don’t seem to work in 2012. Wat is one to do. Well after posting some questions online, someone pointed me to this snippet in this Stackoverflow post
<?xml version="1.0" encoding="utf-8"?>
NLog Logger Snippet
<![CDATA[private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();]]>
If you create a file named nlogger.snippet in the following folder : C:\Users\gcoleman\Documents\Visual Studio 2012\Code Snippets\Visual C#\My Code Snippets and paste the above xml code into the file, you will have created a VS 2012 snippet. YAY.. GO YOU!!
Now all you have to do is Open VS 2012 and go to Tools-> Code Snippet Manager. Once there, select the import button and Browse the location of your snippet. Once selected, it will ask you to select the frameworks this should be allowed to be used in. I choose C#, ASP.NET etc.. but you can select anything you want. upon completion, you should be able to start using your new snippet right away!