2018-04-19 00:58:09 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Microsoft.AspNetCore;
|
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
2018-12-13 12:13:59 +01:00
|
|
|
|
using Serilog;
|
2018-04-19 00:58:09 +02:00
|
|
|
|
|
|
|
|
|
namespace Ordering.SignalrHub
|
|
|
|
|
{
|
|
|
|
|
public class Program
|
|
|
|
|
{
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
BuildWebHost(args).Run();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static IWebHost BuildWebHost(string[] args) =>
|
|
|
|
|
WebHost.CreateDefaultBuilder(args)
|
|
|
|
|
.UseStartup<Startup>()
|
2018-12-13 12:13:59 +01:00
|
|
|
|
.UseSerilog((builderContext, config) =>
|
|
|
|
|
{
|
|
|
|
|
config
|
|
|
|
|
.MinimumLevel.Information()
|
|
|
|
|
.Enrich.FromLogContext()
|
|
|
|
|
.WriteTo.Console();
|
|
|
|
|
})
|
2018-04-19 00:58:09 +02:00
|
|
|
|
.Build();
|
|
|
|
|
}
|
|
|
|
|
}
|