From 6b092f8a41a2cc54fd5baa45324de0f54534a18a Mon Sep 17 00:00:00 2001 From: Marc Hernandez Date: Sun, 2 Nov 2025 16:17:30 -0800 Subject: [PATCH] Better guid logging --- util/Guid.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/util/Guid.cs b/util/Guid.cs index 4c47de7..b06d820 100644 --- a/util/Guid.cs +++ b/util/Guid.cs @@ -9,7 +9,7 @@ public static class GuidExt { extension(Guid g) { - public string Log => $"{g.LastByte():X}"; + public string Log => $"{g.LastUShort():X8}"; } public static System.Guid GuidFromLongs( long a, long b ) @@ -92,6 +92,12 @@ public static class GuidExt return (a, b, c, d); } + public static ushort LastUShort( this System.Guid guid ) + { + var bytes = guid.ToByteArray(); + return BitConverter.ToUInt16( bytes, 14 ); + } + public static byte LastByte( this System.Guid guid ) { var bytes = guid.ToByteArray();