Skip to content

Commit

Permalink
chore(core): Added net runtime version info to global logging (#3099)
Browse files Browse the repository at this point in the history
Added net runtime version info to global logging
  • Loading branch information
JR-Morgan authored Dec 8, 2023
1 parent 4dc7ba9 commit 7fbf8d4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Core/Core/Logging/SpeckleLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,20 @@ private static void _addHostOsInfoToGlobalContext()
{
var osVersion = Environment.OSVersion;
var osArchitecture = RuntimeInformation.ProcessArchitecture.ToString();
GlobalLogContext.PushProperty("hostOs", _deterimineHostOsSlug());
var osSlug = _deterimineHostOsSlug();
var runtime = RuntimeInformation.FrameworkDescription;
GlobalLogContext.PushProperty("hostOs", osSlug);
GlobalLogContext.PushProperty("hostOsVersion", osVersion);
GlobalLogContext.PushProperty("hostOsArchitecture", osArchitecture);
GlobalLogContext.PushProperty("runtime", runtime);

Logger.Information(
"Executing using {runtime} on {hostOs} {hostOsVersion} {hostOsArchitecture}",
runtime,
osSlug,
osVersion,
osArchitecture
);
}

private static void _addHostApplicationDataToGlobalContext(string hostApplicationName, string? hostApplicationVersion)
Expand Down

0 comments on commit 7fbf8d4

Please sign in to comment.