2019-05-01 21:41:28 +00:00
|
|
|
|
using Microsoft.AspNetCore;
|
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
|
using Serilog;
|
|
|
|
|
using Serilog.Events;
|
|
|
|
|
using Serilog.Sinks.SystemConsole.Themes;
|
|
|
|
|
|
2019-10-13 14:18:29 +00:00
|
|
|
|
namespace SteamOpenIdConnectProvider
|
2019-05-01 21:41:28 +00:00
|
|
|
|
{
|
|
|
|
|
public class Program
|
|
|
|
|
{
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
Log.Logger = new LoggerConfiguration()
|
|
|
|
|
.MinimumLevel.Debug()
|
|
|
|
|
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
|
|
|
|
|
.MinimumLevel.Override("System", LogEventLevel.Warning)
|
|
|
|
|
.MinimumLevel.Override("Microsoft.AspNetCore.Authentication", LogEventLevel.Information)
|
|
|
|
|
.Enrich.FromLogContext()
|
|
|
|
|
.WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level}] {SourceContext}{NewLine}{Message:lj}{NewLine}{Exception}{NewLine}", theme: AnsiConsoleTheme.Literate)
|
|
|
|
|
.CreateLogger();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CreateWebHostBuilder(args).Build().Run();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
|
|
|
|
WebHost.CreateDefaultBuilder(args)
|
|
|
|
|
.UseKestrel()
|
|
|
|
|
.UseSerilog()
|
|
|
|
|
.UseStartup<Startup>();
|
|
|
|
|
}
|
|
|
|
|
}
|