Repository navigation
Importing Settings doesn't work #480
Description
Activity
which version are you on?
I apologize, forgot to specify: v1.2.0 on windows10
- addedbugPesky little gritter, needs squashingPesky little gritter, needs squashing
on Oct 7, 2025 In addition, I'm experiencing strange beahviour with the application: when I close it and open it again, I often (not always) find all settings gone. It's like the application has been reset...somehow. Honestly, I don't think this is application related , but I can't think of any system related reason causing the issue. I never experienced something like this with version 1.9.0 (the last one I used before moving to 1.20.0). Do you have any suggestion?
Reacted by Alessio Bianchetti and Björn Seiffert@bennyevangelista This is a known issue in version 1.20.0 and fix is in the works. See issue #470.
You might try downloading and running the snapshot build scroll to the very end and look for "Snapshot-Release".
If you'd like to help with further troubleshooting, you can enable logging by dropping this NLog.config file in the LogExpert directory. Log will be written to
C:\Temp\LogExpert\logs\logexpert.log(directory will be created) but you can edit the config file to change the path.
After reproducing the error, please post the relevant(ERROR|FATAL)log messages here.Reacted by Benny EvangelistaI apologize, forgot to specify: v1.2.0 on windows10
what settings are not loaded? what is the value before and after loading? if a i import a settings.json, the settings are loaded and set to the settings in the json file, maybe a particular setting is missing?
another problem could be, that the loaded settings are overwritten by the settings that are stored in the "%appData%\logexpert folder
In addition, I'm experiencing strange beahviour with the application: when I close it and open it again, I often (not always) find all settings gone. It's like the application has been reset...somehow. Honestly, I don't think this is application related , but I can't think of any system related reason causing the issue. I never experienced something like this with version 1.9.0 (the last one I used before moving to 1.20.0). Do you have any suggestion?
Same problem. Almost every time I close the application, all settings are lost and I have to reimport them again. Also, a few times a day LogExpert crashes, and all settings are lost, so I need to reimport them again . 1.20.0.0/Windows 11
And one of the exported settings json cannot be applied again - and also 'Settings imported' windows appears showing that import worked.Reacted by Benny Evangelista and jgomila- linked a pull request that will close this issueupdate settings, should now no longer be lost #485
on Nov 3, 2025 hopefully fixed with #485
I tried importing settings in the build from the last PR and import fails with
Columnizer type 'Apache error log' not found.
The 'Apache error log' is a RegexColumnizer. Hard to tell which element it is because there are multiple references to that columnizer in the settings file.Stack trace:
Error deserializing settings.json: Newtonsoft.Json.JsonSerializationException: Columnizer type 'Apache error log' not found. at LogExpert.Core.Classes.JsonConverters.ColumnizerJsonConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) in D:\a\LogExpert\LogExpert\src\LogExpert.Core\Classes\JsonConverters\ColumnizerJsonConverter.cs:line 69 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at LogExpert.Config.ConfigManager.LoadOrCreateNew(FileInfo fileInfo) in D:\a\LogExpert\LogExpert\src\LogExpert\Config\ConfigManager.cs:line 326Also, the "Import Failed" dialog has only one button – "OK" but text mentions "YES" and "NO". I think I saw a Copilot comment about that discrepancy in the PR.
Reacted by Patrick BrunerThe culprit in my case is on JSON path
FilterParams.CurrentColumnizer.
Unfortunately, it also affects loading of settings and the recovery feature – loading fromsettings,json.bak– fails at the same point.Verbatim NLog log file from last startup:
2025-11-06 01:17:12.7093 Started C:\Development\LogExpert_Snapshot-Debug\LogExpert.exe PID 14508 ver 1.20.0.0 at 11/06/2025 01:17:12 2025-11-06 01:17:12.6951|INFO|Program| ============================================================================ LogExpert 1.20.0 started. ============================================================================ 2025-11-06 01:17:12.7256|INFO|LogExpert.Config.ConfigManager|### Load: Loading settings 2025-11-06 01:17:12.7256|INFO|LogExpert.Config.ConfigManager|### Load: Load settings standard mode 2025-11-06 01:17:12.7349|INFO|LogExpert.Config.ConfigManager|Loading settings from: C:\Users\andis\AppData\Roaming\LogExpert\settings.json 2025-11-06 01:17:13.2364|ERROR|LogExpert.Config.ConfigManager|Error deserializing settings.json: Newtonsoft.Json.JsonSerializationException: Columnizer type 'Apache error log' not found. at LogExpert.Core.Classes.JsonConverters.ColumnizerJsonConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) in D:\a\LogExpert\LogExpert\src\LogExpert.Core\Classes\JsonConverters\ColumnizerJsonConverter.cs:line 69 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at LogExpert.Config.ConfigManager.LoadOrCreateNew(FileInfo fileInfo) in D:\a\LogExpert\LogExpert\src\LogExpert\Config\ConfigManager.cs:line 326 2025-11-06 01:17:13.2364|WARN|LogExpert.Config.ConfigManager|Attempting to load from backup file: C:\Users\andis\AppData\Roaming\LogExpert\settings.json.bak 2025-11-06 01:17:13.3567|ERROR|LogExpert.Config.ConfigManager|Unexpected error: Columnizer type 'Apache error log' not found. 2025-11-06 01:17:13.3567|INFO|LogExpert.Config.ConfigManager|No settings file found, creating new default settings 2025-11-06 01:17:14.1256|INFO|LogExpert.Classes.LogExpertProxy|Adding window to listI have already mentioned that the reason for the failure is that columnizers are not loaded yet during settings deserialization. Right now it's a bit of chicken/egg issue.
I tried importing settings in the build from the last PR and import fails with
Columnizer type 'Apache error log' not found.The 'Apache error log' is a RegexColumnizer. Hard to tell which element it is because there are multiple references to that columnizer in the settings file.Stack trace:
Also, the "Import Failed" dialog has only one button – "OK" but text mentions "YES" and "NO". I think I saw a Copilot comment about that discrepancy in the PR.
could you add your settings.json so i can test this probably in the evening
could you add your settings.json so i can test this probably in the evening
This is my settings.json after opening a log file, choosing custom RegexColumenizer, and filtering:
{ "$id": "1", "Preferences": { "$id": "2", "HighlightGroupList": [], "PortableMode": false, "ShowErrorMessageAllowOnlyOneInstances": false, "MaxLineLength": 20000, "AllowOnlyOneInstance": false, "AskForClose": false, "DarkMode": false, "UseLegacyReader": false, "ToolEntries": [], "TimestampControlDragOrientation": 0, "TimestampControl": false, "TimeSpreadTimeMode": false, "SessionSaveDirectory": "", "SaveFilters": true, "SaveLocation": 0, "SaveSessions": true, "SetLastColumnWidth": false, "ShowBubbles": true, "ShowColumnFinder": false, "ShowTailColor": "Blue", "ShowTailState": true, "ShowTimeSpread": false, "TimeSpreadColor": "Gray", "IsAutoHideFilterList": false, "IsFilterOnLoad": false, "LastColumnWidth": 2000, "LinesPerBuffer": 500, "MaximumFilterEntries": 30, "MaximumFilterEntriesDisplayed": 20, "MaskPrio": true, "AutoPick": true, "MultiFileOption": 0, "MultiFileOptions": { "$id": "3", "MaxDayTry": 3, "FormatPattern": "*$J(.)" }, "MultiThreadFilter": true, "OpenLastFiles": true, "PollingInterval": 250, "ReverseAlpha": false, "BufferCount": 100, "ColumnizerMaskList": [], "DefaultEncoding": "utf-8", "FilterSync": true, "FilterTail": true, "FollowTail": true, "FontName": "Courier New", "FontSize": 9.0, "HighlightMaskList": [] }, "RegexHistory": { "$id": "5", "ExpressionHistoryList": [], "TesttextHistoryList": [] }, "AlwaysOnTop": false, "AppBounds": "0, 0, 136, 39", "AppBoundsFullscreen": "-8, -8, 1696, 1018", "ColumnizerHistoryList": [ { "$id": "6", "FileName": "C:\\var\\log\\apache2\\error.log", "ColumnizerName": "Apache error logs" } ], "FileColors": [], "FileHistoryList": [ "C:\\var\\log\\apache2\\error.log" ], "FilterHistoryList": [ "(err|warn)", "(error|warn)", "error" ], "FilterList": [], "FilterParams": { "$id": "7", "SearchText": "(err|warn)", "RangeSearchText": "", "IsCaseSensitive": true, "IsFilterTail": true, "FuzzyValue": 0, "EmptyColumnUsePrev": false, "EmptyColumnHit": false, "ExactColumnMatch": false, "ColumnRestrict": false, "Color": "Black", "SpreadBefore": 0, "SpreadBehind": 0, "IsInvert": false, "IsRangeSearch": false, "IsRegex": true, "ColumnList": [], "CurrentColumnizer": { "Type": "Apache error logs", "State": {} } }, "FilterRangeHistoryList": [], "HideLineColumn": false, "IsMaximized": true, "LastDirectory": "C:\\var\\log\\apache2", "LastOpenFilesList": [], "SearchHistoryList": [], "SearchParams": { "$id": "8", "CurrentLine": 0, "HistoryList": [], "IsCaseSensitive": false, "IsFindNext": false, "IsForward": true, "IsFromTop": false, "IsRegex": false, "SearchText": "", "IsShiftF3Pressed": false }, "UriHistoryList": [], "VersionBuild": 0 }The RegexColumnizer XML from
%AppData%\LogExpert\Regex7Columnizer.xml:<?xml version="1.0" encoding="utf-8"?> <RegexColumnizerConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Expression>\[(?<Time>\w{3} \w{3} \d{2} \d+:\d+:\d+.\d+ \d{4}|\d{4}-\d{2}-\d{2} \d+:\d+:\d+.\d+)\] \[(?<Source>\w+):(?<level>\w+)\] \[pid (?<process>\d+):?(?<thread>tid \d+)?\] (?<message>.*)</Expression> <Name>Apache error logs</Name> </RegexColumnizerConfig>
Just to reiterate, steps to reproduce the issue:
- Load a log file
- Choose a columnizer that is a plugin (not built-in)
- Enable filtering and search for whatever
- Close LogExpert to save the settings with
FilterParams.CurrentColumnizerset - Open LogExpert again to trigger the issue
yeah, i see the problem, it's the regex7columnizer that is saved as xml and cannot be found, because it's not loaded. That's a tricky one, will take a little bit of time, till i can pinpoint the real root cause, and how to avoid it.
Probably we need to load the regexColumnizers when loading the settings data and only then compare the columnizer name with what is saved in the settings
yeah, i see the problem, it's the regex7columnizer that is saved as xml and cannot be found, because it's not loaded. That's a tricky one, will take a little bit of time, till i can pinpoint the real root cause, and how to avoid it.
The root cause is that the columnizer lookup/resolution is done when loading settings, before
PluginRegistryloads and instanciates plugin assemblies.Probably we need to load the regexColumnizers when loading the settings data and only then compare the columnizer name with what is saved in the settings
Yes, that would be a solution. Maybe the columnizer resolution logic could be moved to
LogWindow(?) as an event listener and started by firing an event inPluginRegistrywhen it's done loading all plugins.no that is not a good idea, logwindow is already a class full of stuff that it should not be responsible of
If adding more logic to
LogWindowis not a great idea, then maybe the event callback could be introduced in theConfigManager?- linked a pull request that will close this issue470 settings deserialization fails if filterparamscurrentcolumnizer cant be deserialized #492
on Nov 24, 2025 Json file was created with 1.9.0
The format of settings file has changed and is not backwards compatible. You could try merging parts of your old
settings.jsoninto the new format.The oldest settings file I can find (not sure which version) has highlight settings in
HilightEntryListbut in recent versions it's been renamed toHighlightEntryList(correcting a typo).
There are some other minor letter case differences (likeIsRegex=>IsRegEx) that might prevent correct import, so pay attention to those. But the most important one is that all JSON objects insettings.jsonfile should have a unique$idelement.You can use a merge tool like WinMerge or Meld to compare and merge the files. To make it easier, create the same number of highlight entries with whatever options in the LogExpert 1.21.0 and then use that as a template to merge highlighter entries from the old
settings.jsonfile.Was this fixed? My settings with highlights still do not import in latest, 1.21.0.0
there should be at least one option
Dark Python Logsin the highlighting dropdown that are never loaded. Json file was created with 1.9.0
Should I write up a new issue?
if you have an older version, i think till version 1.12 you it will be upgraded, but I'm not sure, its been a few years
As in the title, from the Configure menu I exported a json settings file , when I try to import it I see the "settings imported" message, but no setting is loaded.
The json content seems correct, I see my highlighting settings and other options.