支持注册Windows服务
This commit is contained in:
parent
7ee12e8bf7
commit
76741ec96e
|
@ -8,6 +8,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Falcon.Extend" Version="1.2.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Redis" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="3.1.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.3" />
|
||||
<PackageReference Include="NLog" Version="4.7.0" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.9.1" />
|
||||
|
|
|
@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Hosting;
|
|||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using NLog.Web;
|
||||
using Microsoft.Extensions.Hosting.WindowsServices;
|
||||
|
||||
namespace FAuth
|
||||
{
|
||||
|
@ -27,11 +28,11 @@ namespace FAuth
|
|||
.ConfigureWebHostDefaults(webBuilder => {
|
||||
webBuilder.UseStartup<Startup>();
|
||||
})
|
||||
.UseWindowsService()
|
||||
.ConfigureLogging(c => {
|
||||
c.ClearProviders();
|
||||
c.SetMinimumLevel(LogLevel.Trace);
|
||||
})
|
||||
.UseNLog();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user