[CP] Logs

This commit is contained in:
hydrant
2019-09-22 15:16:05 +02:00
parent 10833a5285
commit d29f6acbf5
5 changed files with 85 additions and 21 deletions

View File

@@ -18,13 +18,19 @@ namespace ReallifeGamemode.DataService
BuildWebHost(args).Run();
}
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseKestrel(k =>
{
k.Listen(IPAddress.Any, 5000);
})
.Build();
public static IWebHost BuildWebHost(string[] args)
{
return WebHost.CreateDefaultBuilder(args)
.ConfigureLogging((ctx, l) =>
{
l.AddLog4Net(Path.Combine(ctx.HostingEnvironment.ContentRootPath, "log4net.config"));
})
.UseStartup<Startup>()
.UseKestrel(k =>
{
k.Listen(IPAddress.Any, 5000);
})
.Build();
}
}
}