Created
April 23, 2017 05:06
-
-
Save FacileTechnolab/b28f9e0307f15a58581aeb60406cbcf4 to your computer and use it in GitHub Desktop.
Configure NLog in servicestack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//requires package installation | |
//install-package ServiceStack.Logging.NLogger; | |
//requires using statements | |
//using ServiceStack.Logging.NLogger; | |
//using ServiceStack.Logging; | |
//add this to public override void Configure(Container container) method | |
LogManager.LogFactory = new NLogFactory(); | |
container.Register<ILog>(ctx => LogManager.LogFactory.GetLogger(typeof(IService))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment