Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public static class Program
public static void Main(string[] args)
var host = new WebHostBuilder()
.ConfigureAppConfiguration((context, configBuilder) =>
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{context.HostingEnvironment.EnvironmentName}.json", optional: true)
Log.Logger = new LoggerConfiguration()
.ConfigureLogging((context, loggingBuilder) =>
loggingBuilder.AddSerilog(dispose: true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.