Created
March 13, 2021 05:41
-
-
Save superwalnut/7b81bff7951d81a7969cdc05149bf422 to your computer and use it in GitHub Desktop.
code block for create-dotnet-core-console-app-with-autofac-dependency-injection-5
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
public static void CreateLogger(IConfigurationRoot configuration) | |
{ | |
Log.Logger = new LoggerConfiguration() | |
.MinimumLevel.Debug() | |
.MinimumLevel.Override("Microsoft", LogEventLevel.Information) | |
.Enrich.FromLogContext() | |
.ReadFrom.Configuration(configuration) | |
.CreateLogger(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment