mirror of https://github.com/abpframework/abp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1000 B
36 lines
1000 B
using System;
|
|
using Microsoft.AspNetCore.Builder;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.Logging;
|
|
using Serilog;
|
|
|
|
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo
|
|
{
|
|
public class Startup
|
|
{
|
|
public IServiceProvider ConfigureServices(IServiceCollection services)
|
|
{
|
|
services.AddApplication<AbpAspNetCoreMvcUiBootstrapDemoModule>(options =>
|
|
{
|
|
options.UseAutofac();
|
|
});
|
|
|
|
return services.BuildServiceProviderFromFactory();
|
|
}
|
|
|
|
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
|
{
|
|
loggerFactory
|
|
.AddConsole()
|
|
.AddDebug()
|
|
.AddSerilog(new LoggerConfiguration()
|
|
.Enrich.FromLogContext()
|
|
.WriteTo.File("Logs/logs.txt")
|
|
.CreateLogger()
|
|
);
|
|
|
|
app.InitializeApplication();
|
|
}
|
|
}
|
|
}
|