====== 98 Upgrade Instructions ====== ===== v2.1.2 ===== With version 2.1.2 we swapped the ''Name'' and ''Level'' input terminals of the ''Create UserEventHandler'' method to align it with the other Handler classes. Unfortunately, this introduces a breaking change in the HSE Logger API and breaks existent code that use the ''UserEventHandler'' class. Luckily, all you have to do is to switch the "Name" and "Level" wires for the ''Create UserEventHandler'' method (see example below). {{:code:open-source:hse-logger:screenshot_2024-03-05_121904.png|}} ⤋ //Fix the broken code by switching the input wires.// ⤋ {{:code:open-source:hse-logger:screenshot_2024-03-05_121935.png|}} ==== If you already used the Formatter functionality with v2.1.0 ==== With v2.1.0 we introduced the Formatter classes to give the developer an easy tool to affect how Handler classes format their string output. But as so often in software development, we made a few mistakes in the first version and fixed them with version 2.1.2. One of these mistakes was to give the Handler base class (''Handler.lvclass'') a Formatter property and ''Set/Get Formatter'' methods, despite the fact that there are Handler classes which have no usage for a Formatter object (like the ''UserEventHandler'' class). In our strive for clean code, we decided to remove the ''Formatter'' object and related methods from the base class and include them only in classes that actually can use them (e.g. ''FileHandler''). A second issue in version 2.1.0 was, that the "Handler Create" methods had no ''Formatter'' input terminal. This led to the fact that one has to use the ''Set Formatter'' method to set a custom Formatter object for a Handler. With the update to version 2.1.2 we moved the Setter/Getter methods and LabVIEW can't find the ''Set Formatter'' method anymore, the code is broken. To fix this for the ''FileHandler'' class, you have to relink the missing VI with the ''FileHandler.lvclass:Set Formatter.vi'' method. For the ''UserEventHandler'' class, you have to remove the ''Set Formatter'' method from the block diagram because the class no longer has a ''Formatter'' property (makes no sense for this class). The recommended way to use Formatter objects with Handlers from version 2.1.2 onwards is to use the ''Formatter'' input terminal in the respective "Create Handler" methods. Only "Create" methods from Handler classes which support ''Formatters'' have this input terminal. See the ''Logging with Helper-VIs.vi'' example. {{:code:open-source:hse-logger:screenshot_2024-03-05_105431.png|}}