You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
namespace LogStudy.WebApp
|
|
|
|
|
{
|
|
|
|
|
public class Program
|
|
|
|
|
{
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
CreateWebHostBuilder(args).Build().Run();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
|
|
|
|
|
WebHost.CreateDefaultBuilder(args)
|
|
|
|
|
.ConfigureLogging((hostbuildContext, logBuild) => {
|
|
|
|
|
var config = hostbuildContext.Configuration;
|
|
|
|
|
var ev = hostbuildContext.HostingEnvironment;
|
|
|
|
|
|
|
|
|
|
logBuild
|
|
|
|
|
.AddConsole()
|
|
|
|
|
.AddDebug()
|
|
|
|
|
.AddEventLog()
|
|
|
|
|
.AddEventSourceLogger()
|
|
|
|
|
.AddTraceSource("NetCoreDemo")
|
|
|
|
|
.SetMinimumLevel(LogLevel.Information);
|
|
|
|
|
})
|
|
|
|
|
.UseStartup<Startup>();
|
|
|
|
|
}
|
|
|
|
|
}
|