aboutsummaryrefslogtreecommitdiffstats
path: root/test/lua/util.lua
AgeCommit message (Collapse)AuthorFilesLines
2022-10-11Windows: Store "gui.console_open" in the Windows registryJoão Valverde1-9/+8
This removes the last dependency of the logging subsystem on the preferences module. The latter is started much later than the former and this is an issue. The Windows-only preference "gui.console_open" is stored in the registry as HKEY_LOCAL_USER\Software\Wireshark\ConsoleOpen. The semantics are exactly the same. The preference is read by the logging subsystem for initialization and then again by the preferences (read/write) so the user can configure it as before. The code to store the preference also in the preferences file was kept, for backward compatibility and because it is not incompatible with using the Registry concurrently. The elimination of the prefs dependency also allows moving the Windows console logic to wsutil and add the functionality to wslog directly, thereby eliminating the superfluous Wireshark/Logray custom log handler. To be able to read the ws_log_console_open global variable from libwireshark it becomes necessary to add a new export macro symbol called WSUTIL_EXPORT.
2020-12-08Lua: Add get_preference() and set_preference() utility functions.Stig Bjørlykke1-0/+123
Support uint, bool, enum, string, range, filename and directory preferences. Added apply_preferences() to write to file and apply changes.