Skip to content

Instantly share code, notes, and snippets.

@OdeToCode
Created October 3, 2016 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OdeToCode/46d4eaa0ed0d4a1cf1496cfb45b84650 to your computer and use it in GitHub Desktop.
Save OdeToCode/46d4eaa0ed0d4a1cf1496cfb45b84650 to your computer and use it in GitHub Desktop.
using (var db = new ThingDb())
{
// just need this once for all instances to log:
var serviceProvider = db.GetInfrastructure();
var loggerFactory = serviceProvider.GetService<ILoggerFactory>();
loggerFactory.AddConsole();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment