diff --git a/IRaCIS.Core.API/Program.cs b/IRaCIS.Core.API/Program.cs index ad2c3f425..3878accd3 100644 --- a/IRaCIS.Core.API/Program.cs +++ b/IRaCIS.Core.API/Program.cs @@ -13,6 +13,7 @@ using System.IO; using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Infra.EFCore; using IRaCIS.Core.Application.Helper; +using System.Runtime.InteropServices; namespace IRaCIS.Core.API { @@ -55,12 +56,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()); - + + host.Run(); + } catch (Exception e)