Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sabljakovich/6d5ce1b120f842eb1a041a4beb772350 to your computer and use it in GitHub Desktop.

Select an option

Save sabljakovich/6d5ce1b120f842eb1a041a4beb772350 to your computer and use it in GitHub Desktop.
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureLogging(loggerBuilder =>
{
loggerBuilder
.ClearProviders()
// Example output: [20/11/20 14:31:30:409] info: ...
.AddConsole(configure => configure.TimestampFormat = "[dd/MM/yy HH:mm:ss:fff] ");
})
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment