ModSlaveSim help v3.04 - 3.6. Logging: Edit Logging
Download manual: HTML
This is where you edit settings for logging, including whether to log to a file or window or both. If you choose a file, then you may choose a new filename and a maximum file size. You may also choose the type and level of modbus tracing for the log. For a fuller description, and examples, of the types of log entries see appendix Logging).
Turning logging on or off is done by a button on the toolbar in the main window (see the subsection Logging in the ModSlaveSim Window section.
To navigate to these settings, type Ctrl-W to bring up the Edit Settings... dialog, then with the Logging tab selected, click on the subpanel title under Edit Logging Settings.
You can choose whether to log to a window, a file or both.
Log to Window. Check this checkbox to have logging sent to the Log Window (the default is unchecked). The window log can be viewed by selecting View->View Logging on the main dialog.
Log to File. Check this checkbox to have logging sent to a file (the default is unchecked). If selected then other settings for the file will become enabled for you to edit if you choose. These are listed below.
File Size (Max MB). Here you can enter the maximum size in Megabytes that the log should reach before backup. The default is 1 Mb. When the configured size is reached, the file is copied to a backup of the same name as the log file but with .bak appended. (So the default backup file would be
modslavesim.0.log.baklocated in the user's home dir.) If the backup already exists, then the original is overwritten. The log file itself is truncated to start a new log. Note that if the backup is not deleted, then disk space used could be up to double the selected size when a log file is almost at its maximum.
File Path. An uneditable field used to display the current path for the log file. The default path is the user's home directory. You may choose a different log path by pressing the Browse... button.
File Name. An uneditable field used to display the current name for the log file. This defaults to
modslavesim.0.log. You may choose a different log file by pressing the Browse... button.
Log entries. Choose the type and level of log entries here. If you select None for the interpreted messages, then you need to select Raw Hex log entries in order to have any Modbus message entries. Note that a fuller description and examples of log entries can be found in the appendix Logging).
Raw. Check this if you want to have Modbus messages traced in their raw form in hexadecimal.
Interpreted. You can opt to have an interpreted version of the raw Modbus messages, which are easier to understand than the raw data. Select the standard Std option to trace Modbus messages but exclude the actual values written or read. Select the extended Ext (W) version to do the standard tracing and to trace values that were written to registers. Select the extended Ext (W/R) to do all the above and to trace values that were read from registers. You may also select None to stop any interpreted Modbus messages being traced.
Press Apply to apply the changes. This is also still required for any changes made on the Browse... button dialog and subsequently displayed on the panel.