From 2e96f7a936a872a20f652acb2f1778206f48a19b Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 30 Nov 2023 11:23:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=8F=90=E7=A4=BA=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E9=83=A8=E7=BD=B2=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/Program.cs | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.API/Program.cs b/IRaCIS.Core.API/Program.cs index cd37383b2..07154c6c1 100644 --- a/IRaCIS.Core.API/Program.cs +++ b/IRaCIS.Core.API/Program.cs @@ -13,8 +13,7 @@ using System.IO; using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infra.EFCore; using IRaCIS.Core.Application.Helper; -using IRaCIS.Application.Services.BackGroundJob; -using Hangfire; +using System.Runtime.InteropServices; namespace IRaCIS.Core.API { @@ -58,16 +57,29 @@ namespace IRaCIS.Core.API //// Serilog SerilogExtension.AddSerilogSetup(enviromentName, host.Services); + 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()); - ////缓存项目的状态 匿名化数据 - //await InitCache(host); - + host.Run(); + } catch (Exception e)