From 25280c92eae565b75208e64c1426c1b0d1f7426a Mon Sep 17 00:00:00 2001 From: BRUNER Patrick Date: Wed, 21 Jan 2026 18:03:13 +0100 Subject: [PATCH 1/3] added backwards compatibility for hilightgroups in old settings files --- src/LogExpert.Configuration/ConfigManager.cs | 5 +-- src/LogExpert.Core/Config/Preferences.cs | 24 +++++++++++ src/LogExpert.Core/Config/Settings.cs | 43 +++++++++++++++++++ src/LogExpert.Core/Entities/HighlightGroup.cs | 23 ++++++++++ 4 files changed, 92 insertions(+), 3 deletions(-) diff --git a/src/LogExpert.Configuration/ConfigManager.cs b/src/LogExpert.Configuration/ConfigManager.cs index 5b8e716a..d3fa4903 100644 --- a/src/LogExpert.Configuration/ConfigManager.cs +++ b/src/LogExpert.Configuration/ConfigManager.cs @@ -817,9 +817,8 @@ PathTooLongException or private static void SaveHighlightGroupsAsJSON (FileInfo fileInfo, List groups) { - using StreamWriter sw = new(fileInfo.Create()); - JsonSerializer serializer = new(); - serializer.Serialize(sw, groups); + string json = JsonConvert.SerializeObject(groups, Formatting.Indented); + File.WriteAllText(fileInfo.FullName, json, System.Text.Encoding.UTF8); } /// diff --git a/src/LogExpert.Core/Config/Preferences.cs b/src/LogExpert.Core/Config/Preferences.cs index f3965980..8673acfa 100644 --- a/src/LogExpert.Core/Config/Preferences.cs +++ b/src/LogExpert.Core/Config/Preferences.cs @@ -8,8 +8,32 @@ namespace LogExpert.Core.Config; [Serializable] public class Preferences { + + /// + /// List of highlight groups for syntax highlighting and text coloring. + /// + /// + /// Supports legacy property name "hilightGroupList" (with typo) for backward compatibility. + /// Old settings files using the incorrect spelling will be automatically imported. + /// + [Newtonsoft.Json.JsonProperty("HighlightGroupList")] + [System.Text.Json.Serialization.JsonPropertyName("HighlightGroupList")] public List HighlightGroupList { get; set; } = []; + /// + /// Legacy property for backward compatibility with old settings files that used the typo "hilightGroupList". + /// This setter redirects data to the correct property. + /// Will be removed in a future version once migration period is complete. + /// + [Obsolete("This property exists only for backward compatibility with old settings files. Use HighlightGroupList instead.")] + [Newtonsoft.Json.JsonProperty("hilightGroupList")] + [System.Text.Json.Serialization.JsonPropertyName("hilightGroupList")] + public List HilightGroupList + { + get => HighlightGroupList; + set => HighlightGroupList = value ?? []; + } + public bool PortableMode { get; set; } /// diff --git a/src/LogExpert.Core/Config/Settings.cs b/src/LogExpert.Core/Config/Settings.cs index 7ba088cf..5921663e 100644 --- a/src/LogExpert.Core/Config/Settings.cs +++ b/src/LogExpert.Core/Config/Settings.cs @@ -1,6 +1,8 @@ using System.Drawing; using LogExpert.Core.Classes.Filter; +using LogExpert.Core.Classes.Highlight; +using LogExpert.Core.Entities; using LogExpert.Entities; namespace LogExpert.Core.Config; @@ -34,6 +36,47 @@ public class Settings public bool HideLineColumn { get; set; } + /// + /// Legacy property for backward compatibility with old settings files that had hilightEntryList at root level. + /// This property redirects data to Preferences.HighlightGroupList during import. + /// Will be removed in a future version once migration period is complete. + /// + [Obsolete("This property exists only for backward compatibility with old settings files. Data is stored in Preferences.HighlightGroupList.")] + [Newtonsoft.Json.JsonProperty("hilightEntryList")] + [System.Text.Json.Serialization.JsonPropertyName("hilightEntryList")] + [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] + public List HilightEntryList + { + get => null; // Never serialize this + set + { + // This was likely empty in old files as entries were in groups + // Keep for compatibility but likely unused + } + } + + /// + /// Legacy property for backward compatibility with old settings files that had hilightGroupList at root level. + /// This property redirects data to Preferences.HighlightGroupList during import. + /// Will be removed in a future version once migration period is complete. + /// + [Obsolete("This property exists only for backward compatibility with old settings files. Data is stored in Preferences.HighlightGroupList.")] + [Newtonsoft.Json.JsonProperty("hilightGroupList")] + [System.Text.Json.Serialization.JsonPropertyName("hilightGroupList")] + [System.Text.Json.Serialization.JsonIgnore(Condition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingDefault)] + public List HilightGroupList + { + get => null; // Never serialize this + set + { + if (value != null && value.Count > 0) + { + Preferences ??= new Preferences(); + Preferences.HighlightGroupList = value; + } + } + } + public bool IsMaximized { get; set; } public string LastDirectory { get; set; } diff --git a/src/LogExpert.Core/Entities/HighlightGroup.cs b/src/LogExpert.Core/Entities/HighlightGroup.cs index e8f5d8ce..3b244792 100644 --- a/src/LogExpert.Core/Entities/HighlightGroup.cs +++ b/src/LogExpert.Core/Entities/HighlightGroup.cs @@ -9,8 +9,31 @@ public class HighlightGroup : ICloneable public string GroupName { get; set; } = string.Empty; + /// + /// List of highlight entries defining text patterns and their formatting. + /// + /// + /// Supports legacy property name "hilightEntryList" (with typo) for backward compatibility. + /// Old settings files using the incorrect spelling will be automatically imported. + /// + [Newtonsoft.Json.JsonProperty("HighlightEntryList")] + [System.Text.Json.Serialization.JsonPropertyName("HighlightEntryList")] public List HighlightEntryList { get; set; } = []; + /// + /// Legacy property for backward compatibility with old settings files that used the typo "hilightEntryList". + /// This setter redirects data to the correct property. + /// Will be removed in a future version once migration period is complete. + /// + [Obsolete("This property exists only for backward compatibility with old settings files. Use HighlightEntryList instead.")] + [Newtonsoft.Json.JsonProperty("hilightEntryList")] + [System.Text.Json.Serialization.JsonPropertyName("hilightEntryList")] + public List HilightEntryList + { + get => HighlightEntryList; + set => HighlightEntryList = value ?? []; + } + public object Clone () { HighlightGroup clone = new() From cc84aa411a29e9f31326b21acc1b77c3540712a8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 22 Jan 2026 09:50:59 +0000 Subject: [PATCH 2/3] chore: update plugin hashes [skip ci] --- .../PluginHashGenerator.Generated.cs | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/PluginRegistry/PluginHashGenerator.Generated.cs b/src/PluginRegistry/PluginHashGenerator.Generated.cs index b899daad..c0c9b458 100644 --- a/src/PluginRegistry/PluginHashGenerator.Generated.cs +++ b/src/PluginRegistry/PluginHashGenerator.Generated.cs @@ -10,7 +10,7 @@ public static partial class PluginValidator { /// /// Gets pre-calculated SHA256 hashes for built-in plugins. - /// Generated: 2026-01-16 12:28:08 UTC + /// Generated: 2026-01-22 09:50:57 UTC /// Configuration: Release /// Plugin count: 22 /// @@ -18,28 +18,28 @@ public static Dictionary GetBuiltInPluginHashes() { return new Dictionary(StringComparer.OrdinalIgnoreCase) { - ["AutoColumnizer.dll"] = "0BFB2D25838DA085A00A97A8710E48F36E4FE188F9E976800CEBB5BDA10EDCF1", + ["AutoColumnizer.dll"] = "D61ACCA52613FFF81D6C63D9405C489A3632C3A4021D3968CA5EC360B916F7CF", ["BouncyCastle.Cryptography.dll"] = "E5EEAF6D263C493619982FD3638E6135077311D08C961E1FE128F9107D29EBC6", ["BouncyCastle.Cryptography.dll (x86)"] = "E5EEAF6D263C493619982FD3638E6135077311D08C961E1FE128F9107D29EBC6", - ["CsvColumnizer.dll"] = "B14C7D822278C2F500DA7C6334CE270571DDDCBAC9C37AC1B83F24FD4FB830CE", - ["CsvColumnizer.dll (x86)"] = "B14C7D822278C2F500DA7C6334CE270571DDDCBAC9C37AC1B83F24FD4FB830CE", - ["DefaultPlugins.dll"] = "F4A28A04F9436DA392C96D1C9B0D170028828F43C32CAF810979ED5BDB9B2D25", - ["FlashIconHighlighter.dll"] = "0CE4817376FE88CBF8CBE57E5618B70A55CAB65E3C415930F3D7576250C17207", - ["GlassfishColumnizer.dll"] = "98F431670B729AF7395FF06618C91A3C6D1848238D25D1BDF2FB9BA99898E260", - ["JsonColumnizer.dll"] = "8B265F2AEC35C0FE66BBCC991865E51BFBD230D7DED90A83219FF33DCE7A7048", - ["JsonCompactColumnizer.dll"] = "B89B13B5631E280F45C258DC97059C54869DDB301BD0469EBDCDFC40ED6535F4", - ["Log4jXmlColumnizer.dll"] = "37F5D952E453039936889F19FFC6674C7408011166865096AE61502E19827302", - ["LogExpert.Core.dll"] = "1696D36D01BC2D13BA8EA356E002225D8379F1CBB442B379B1E60D5A9B23EC93", - ["LogExpert.Resources.dll"] = "4BE617F7376269CEF31F7DCA49FBA73619488FCC24FD940E448D0516702DE368", + ["CsvColumnizer.dll"] = "207513FF61279CD990D4C75BFB8A72FFACA63D546704CA2F26116E9EBE89C4FF", + ["CsvColumnizer.dll (x86)"] = "207513FF61279CD990D4C75BFB8A72FFACA63D546704CA2F26116E9EBE89C4FF", + ["DefaultPlugins.dll"] = "95548C1D0C9C725DAD41229270FF45EB31C34E53C60BDAD0F37CDF1D0E8C64D4", + ["FlashIconHighlighter.dll"] = "250C91C2C131F9DEB779B915FA54A4D32AB3238D6B79F6B204100BA090930662", + ["GlassfishColumnizer.dll"] = "8B33936258CE90FE051F30C6AA64EAA02A23FD898312D83D8F093E7688656DD3", + ["JsonColumnizer.dll"] = "5C894AB51BBBCF42DC020EC1E27777761698CDC04ED17741DAA9EB7B25927C2F", + ["JsonCompactColumnizer.dll"] = "5C4503A63A9CE380F14B1476790AE30EA7ACAC2071A4E99D9D621E76B9292CF4", + ["Log4jXmlColumnizer.dll"] = "E440ACF545199E1F9A874197F2C9AF72557C8FFC81EBF2B0EABFFEF6C87987A6", + ["LogExpert.Core.dll"] = "EC6C00AA89577CB594419EF0A462B71B9E248D52C5048C3427D4D0728AFACEF8", + ["LogExpert.Resources.dll"] = "305B641E2EECF68B59A317FDC6054C2F1F576B4C982660D0ABB4D293F3BD6C28", ["Microsoft.Extensions.DependencyInjection.Abstractions.dll"] = "67FA4325000DB017DC0C35829B416F024F042D24EFB868BCF17A895EE6500A93", ["Microsoft.Extensions.DependencyInjection.Abstractions.dll (x86)"] = "67FA4325000DB017DC0C35829B416F024F042D24EFB868BCF17A895EE6500A93", ["Microsoft.Extensions.Logging.Abstractions.dll"] = "BB853130F5AFAF335BE7858D661F8212EC653835100F5A4E3AA2C66A4D4F685D", ["Microsoft.Extensions.Logging.Abstractions.dll (x86)"] = "BB853130F5AFAF335BE7858D661F8212EC653835100F5A4E3AA2C66A4D4F685D", - ["RegexColumnizer.dll"] = "AA23CFE9B60C0C68D9B521FC4DA6D866B6CF10A88DAF71C428408C9EBEC30154", - ["SftpFileSystem.dll"] = "69D4978350F9B50ADCFF4B1EF01BE05121DF569F9216473F893E4D76749CD1B6", - ["SftpFileSystem.dll (x86)"] = "BAD8F0EAA25CD8E9F5C9F42D614D5B222CA6C0FFBC988B7EEFD445DC940FD6DD", - ["SftpFileSystem.Resources.dll"] = "2B447430659DCC8795EF156D4438491CA8504C2C6E2C2000A3BAF523E5C4EBDD", - ["SftpFileSystem.Resources.dll (x86)"] = "2B447430659DCC8795EF156D4438491CA8504C2C6E2C2000A3BAF523E5C4EBDD", + ["RegexColumnizer.dll"] = "5EF11E520E1C41BE7378D93325A2DE90235D2D21C90915EAA1FE49D440A373D3", + ["SftpFileSystem.dll"] = "32FC1829E61844B7A6B2ECE92702371DA4DE6C0B674CDE50DEC4F9269DE7F57B", + ["SftpFileSystem.dll (x86)"] = "E7C4E50CDA2B8DD3CA04443FCF16F8C386A531C4589F6F343F4A113517DF003D", + ["SftpFileSystem.Resources.dll"] = "83DA8F236F7B19281BEA0931E1F0EB31D9B0A0CD59809548BCA012F13CA381D4", + ["SftpFileSystem.Resources.dll (x86)"] = "83DA8F236F7B19281BEA0931E1F0EB31D9B0A0CD59809548BCA012F13CA381D4", }; } From 94d64815c8bf1e97a467b998a654736c384fcf53 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 22 Jan 2026 15:37:01 +0000 Subject: [PATCH 3/3] chore: update plugin hashes [skip ci] --- .../PluginHashGenerator.Generated.cs | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/PluginRegistry/PluginHashGenerator.Generated.cs b/src/PluginRegistry/PluginHashGenerator.Generated.cs index 5a92dced..b1e7657f 100644 --- a/src/PluginRegistry/PluginHashGenerator.Generated.cs +++ b/src/PluginRegistry/PluginHashGenerator.Generated.cs @@ -10,7 +10,7 @@ public static partial class PluginValidator { /// /// Gets pre-calculated SHA256 hashes for built-in plugins. - /// Generated: 2026-01-22 07:56:13 UTC + /// Generated: 2026-01-22 15:36:59 UTC /// Configuration: Release /// Plugin count: 22 /// @@ -18,28 +18,28 @@ public static Dictionary GetBuiltInPluginHashes() { return new Dictionary(StringComparer.OrdinalIgnoreCase) { - ["AutoColumnizer.dll"] = "9C8F3E7BFBAA93A67FCBB8F6D55632468C57030EAE15FC3E96BC269F83E244A1", + ["AutoColumnizer.dll"] = "7BC68D6CAED29AA844E0C3D0EEF354DDD4CBFC4468343F060D6E09D80DC90B95", ["BouncyCastle.Cryptography.dll"] = "E5EEAF6D263C493619982FD3638E6135077311D08C961E1FE128F9107D29EBC6", ["BouncyCastle.Cryptography.dll (x86)"] = "E5EEAF6D263C493619982FD3638E6135077311D08C961E1FE128F9107D29EBC6", - ["CsvColumnizer.dll"] = "C526D416E88ED8EB59934C2CABD55E86C873C1D2822F160077B9D0A172E759CC", - ["CsvColumnizer.dll (x86)"] = "C526D416E88ED8EB59934C2CABD55E86C873C1D2822F160077B9D0A172E759CC", - ["DefaultPlugins.dll"] = "B37B0571F251C0689227C267E95A57D16F6EFD9FCE024E35A7499ED0977863A3", - ["FlashIconHighlighter.dll"] = "024F7D300FF3106E60FF9796CF40E477AC31E36706ADC285D9FB5276E872B0E5", - ["GlassfishColumnizer.dll"] = "D58B9D11609A76E5B515F758560DD984576B59DCDF9B80BC22FA4AF5F4384E68", - ["JsonColumnizer.dll"] = "6CB92960BEA2BFCFD971F753F288EDB75250FA0B6A42500847ED789361A86DF6", - ["JsonCompactColumnizer.dll"] = "786094F70FF7BD793D8B47CDFFA2F9794859240ED1DCDD369F6727CEB6BB627E", - ["Log4jXmlColumnizer.dll"] = "2C2521F0862409C5F67D7471C32608D4DD50221E7F393D7536A33CC1321C5B15", - ["LogExpert.Core.dll"] = "D7B4672FBD21BD9C0707C3D098ED6DC3B94FEFCA593FEB2A5B0D4729FC2278F0", - ["LogExpert.Resources.dll"] = "53281AD7771FA28D1CE64A3C4893196130681A22A741703EF980A1E5A31C140A", + ["CsvColumnizer.dll"] = "D67A6A7B0EAB65B5C352EAED26B89104BC057612279ECD7ADD34BBEE3830019E", + ["CsvColumnizer.dll (x86)"] = "D67A6A7B0EAB65B5C352EAED26B89104BC057612279ECD7ADD34BBEE3830019E", + ["DefaultPlugins.dll"] = "E0503BC7A1CE12E8F18F058C62AB84C2402733E76F9E871C163A3A7900841B5A", + ["FlashIconHighlighter.dll"] = "32510C6566AA4321EFD39190471F9622EED1934D4E415E73D176A150CD4963B5", + ["GlassfishColumnizer.dll"] = "D504BFF6EC14F54C073BF23778C8BB0513F6385B21A10363D6C4415E18ED724A", + ["JsonColumnizer.dll"] = "2C786E6C1E9917EDEB224720C8B4AC7F322A0F9489C07E44F5F62AB887801E79", + ["JsonCompactColumnizer.dll"] = "63E5AE492888DF52C0B5F4584F6CDD35FA8B2DDF8192C75A9DD662C2C4FEDD96", + ["Log4jXmlColumnizer.dll"] = "3E85454E4CFD2563F77B26A3BD7E1A6F85D6B7C0E96338B3FFED1B8BC472C8D7", + ["LogExpert.Core.dll"] = "B8977B248A9A11632B9632D2905A364F98F8625391DDCA40F76CF8CDA185EAE6", + ["LogExpert.Resources.dll"] = "43507497CCBECB8E9A3285A7E837A4B8C88679FC030CF4AA7B2611B203A3AB9C", ["Microsoft.Extensions.DependencyInjection.Abstractions.dll"] = "67FA4325000DB017DC0C35829B416F024F042D24EFB868BCF17A895EE6500A93", ["Microsoft.Extensions.DependencyInjection.Abstractions.dll (x86)"] = "67FA4325000DB017DC0C35829B416F024F042D24EFB868BCF17A895EE6500A93", ["Microsoft.Extensions.Logging.Abstractions.dll"] = "BB853130F5AFAF335BE7858D661F8212EC653835100F5A4E3AA2C66A4D4F685D", ["Microsoft.Extensions.Logging.Abstractions.dll (x86)"] = "BB853130F5AFAF335BE7858D661F8212EC653835100F5A4E3AA2C66A4D4F685D", - ["RegexColumnizer.dll"] = "E58187975AC91B7CF1339511C741C5D571AA015C9DAB0E9694579EAABEEEE69F", - ["SftpFileSystem.dll"] = "65A6149D52DB7A7089FDAFAE6DA78B7197025BBB04C56EC466F3FEF73804B73A", - ["SftpFileSystem.dll (x86)"] = "6D455A9F064804CB7A0639C210629B008B75EDABC6DB30666A7230A14AE4C0B4", - ["SftpFileSystem.Resources.dll"] = "F9045AA68358565F6310B22C960240BDEFFE338888368AEC1CF4B07B8A149F3E", - ["SftpFileSystem.Resources.dll (x86)"] = "F9045AA68358565F6310B22C960240BDEFFE338888368AEC1CF4B07B8A149F3E", + ["RegexColumnizer.dll"] = "0E6C500586C79D0280973B5D2A69AC0DB16FCF1AB963C6016965AE6CE3DB1103", + ["SftpFileSystem.dll"] = "A2C0E76211A0DE50F0C9B2B9BD1B97519ED390382179ACB73AED232245F42D2B", + ["SftpFileSystem.dll (x86)"] = "453EA3A17F9F6CAE24C76C6368264C0FA6745DC0FC8A2E6DAD86B127227A02E5", + ["SftpFileSystem.Resources.dll"] = "A1185922C0FF4ED0E8CE734FDA6B238ADE7C4DD4C8DC3811C41F618FCD4D4C5E", + ["SftpFileSystem.Resources.dll (x86)"] = "A1185922C0FF4ED0E8CE734FDA6B238ADE7C4DD4C8DC3811C41F618FCD4D4C5E", }; }