The log to file visualizer writes all serial data received to a file. For greater control over the content written to file, consider the message logger.

The log to file visualizer configures the path of the log file, start and stops logging and adds time-stamps to lines as they are written.


The log to file visualizer writes serial data to a file.

Creating a Log to File Visualizer

Select Log to File from the visualizer menu or toolbox to create a new visualizer to configure and write a log file.

You can create multiple Log to File visualizers to store data from different connections or write a log to multiple files.

Drag the visualizer tab to organize the windows in your MegunoLink project.

User Interface

The log to file user interface provides controls to choose the log file path start and stop logging, add time-stamps to the lines as they are written.

log to file user interface

Mange serial data logging using the log to file visualizer.

Visualizer Toolbar

Tool Description
Connect/disconnect button Connect/disconnect the selected connection. Use the drop-down to select the connection used by this visualizer.
Insert time Open the drop-down menu to control date and time-stamping new lines appended to the log file.
Delete log file Delete the log file (only available when not writing to the log file).
Write file Enable/disable writing the log file. Open the drop-down menu to enable/disable logging automatically when the connection is opened. A red + is displayed on the toolbar button whenever content is written to the file.
Help Open online documentation for the visualizer.

Log File Path

The log file path is resolved automatically each time the log file is opened. It can reference well known paths, such as your documents, Dropbox or MegunoLink project path, and include the date and/or time.

Click the Configure log path button to open the dialog to view and configure the log file path.

Log file path UI
Configure Log Path

Use the Configure Log Path dialog to build a composite path for writing log files.

Starting and Stopping Logging

To start logging in MegunoLink, check the Enable logging command on the visualizer toolbar. To stop logging uncheck the Enable logging command.

Start and stop logging

MegunoLink can also start logging automatically whenever a connection is opened. Simply check the Start logging automatically when connection is opened menu item. This can be combined with the Restore on Load option in the Connection Manager to open a connection and automatically start logging when the MegunoLink project is opened.

Adding Time/Date to Log

The time and/or date can automatically be added to the log file by selecting one or both of the options on the time-stamp menu.

When enabled, the current date and time are written to the start of each line in the log file.

Time stamp menu
Select an option from the time-stamp drop-down to add the current time and/or date to each line of data written to the log file.
  • Raphael UWAMAHORO

    how to add the time stamps in milliseconds?

Leave a Comment

Start typing and press Enter to search