From bf257a937bc1d18be5590896575aee1ca9335df1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 3 Oct 2022 22:43:58 +0100 Subject: [PATCH] change runtime information log, add processor arch to ossl/lsl sim version --- .../Framework/Servers/BaseOpenSimServer.cs | 22 ++++++------------- OpenSim/Framework/Util.cs | 2 +- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 5feb7b521f..08ee91b4ef 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -49,6 +49,7 @@ using OpenSim.Framework.Servers; using OpenSim.Framework.Servers.HttpServer; using Timer=System.Timers.Timer; using Nini.Config; +using System.Runtime.InteropServices; namespace OpenSim.Framework.Servers { @@ -184,21 +185,12 @@ namespace OpenSim.Framework.Servers { m_log.Info("[STARTUP]: Beginning startup processing"); - m_log.Info("[STARTUP]: version: " + m_version + Environment.NewLine); - // clr version potentially is more confusing than helpful, since it doesn't tell us if we're running under Mono/MS .NET and - // the clr version number doesn't match the project version number under Mono. - //m_log.Info("[STARTUP]: Virtual machine runtime version: " + Environment.Version + Environment.NewLine); - m_log.InfoFormat( - "[STARTUP]: Operating system version: {0}, .NET platform {1}, {2}-bit\n", - Environment.OSVersion, Environment.OSVersion.Platform, Environment.Is64BitProcess ? "64" : "32"); - - // next code can be changed on .net 4.7.x - if(Util.IsWindows()) - m_log.InfoFormat("[STARTUP]: Processor Architecture: {0}({1})", - System.Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE", EnvironmentVariableTarget.Machine), - BitConverter.IsLittleEndian ?"le":"be"); - - // on other platforms we need to wait for .net4.7.1 + m_log.Info("[STARTUP]: version: " + m_version); + m_log.InfoFormat("[STARTUP]: Operating system version: {0}, .NET platform {1}, Runtime {2}", + Environment.OSVersion, Environment.OSVersion.Platform, Environment.Version.ToString()); + m_log.InfoFormat("[STARTUP]: Processor Architecture: {0}({1} {2}bit)", + RuntimeInformation.ProcessArchitecture.ToString(), + BitConverter.IsLittleEndian ?"le":"be", Environment.Is64BitProcess ? "64" : "32"); try { StartupSpecific(); diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index dd85a3e759..b09a77b3f5 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs @@ -2332,7 +2332,7 @@ namespace OpenSim.Framework public static string GetRuntimeInformation() { - return Environment.OSVersion.Platform switch + return RuntimeInformation.ProcessArchitecture.ToString() + "/" + Environment.OSVersion.Platform switch { PlatformID.MacOSX => "OSX/DotNet", PlatformID.Unix => "Unix/DotNet",