Skip to content

Instantly share code, notes, and snippets.

@FacileTechnolab
Created April 23, 2017 05:06
Show Gist options
  • Save FacileTechnolab/b28f9e0307f15a58581aeb60406cbcf4 to your computer and use it in GitHub Desktop.
Save FacileTechnolab/b28f9e0307f15a58581aeb60406cbcf4 to your computer and use it in GitHub Desktop.
Configure NLog in servicestack
//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