日志提示当前部署平台
parent
53544001a7
commit
2e96f7a936
|
@ -13,8 +13,7 @@ using System.IO;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infra.EFCore;
|
using IRaCIS.Core.Infra.EFCore;
|
||||||
using IRaCIS.Core.Application.Helper;
|
using IRaCIS.Core.Application.Helper;
|
||||||
using IRaCIS.Application.Services.BackGroundJob;
|
using System.Runtime.InteropServices;
|
||||||
using Hangfire;
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.API
|
namespace IRaCIS.Core.API
|
||||||
{
|
{
|
||||||
|
@ -58,16 +57,29 @@ namespace IRaCIS.Core.API
|
||||||
|
|
||||||
//// Serilog
|
//// Serilog
|
||||||
SerilogExtension.AddSerilogSetup(enviromentName, host.Services);
|
SerilogExtension.AddSerilogSetup(enviromentName, host.Services);
|
||||||
|
|
||||||
Log.Logger.Warning($"µ±Ç°»·¾³£º{enviromentName}");
|
Log.Logger.Warning($"µ±Ç°»·¾³£º{enviromentName}");
|
||||||
|
|
||||||
|
|
||||||
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
|
{
|
||||||
|
Log.Logger.Warning($"当前部署平台环境:windows");
|
||||||
|
}
|
||||||
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||||
|
{
|
||||||
|
Log.Logger.Warning($"当前部署平台环境:linux");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Log.Logger.Warning($"当前部署平台环境:OSX or FreeBSD");
|
||||||
|
}
|
||||||
|
|
||||||
NewId.SetProcessIdProvider(new CurrentProcessIdProvider());
|
NewId.SetProcessIdProvider(new CurrentProcessIdProvider());
|
||||||
|
|
||||||
////缓存项目的状态 匿名化数据
|
|
||||||
//await InitCache(host);
|
|
||||||
|
|
||||||
host.Run();
|
host.Run();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
Loading…
Reference in New Issue