Logging

Gwyddion records data modification operations for each image, volume or XYZ data in so-called log. When the data are saved to a .gwy file, the log is saved along with them. The log can be displayed by selecting the View Log command in the right-click context menu of the corresponding data window. This is useful for recalling later what corrections you applied, how a mask or presentation was created, etc. It should be noted that the logs are informational; they are neither intended nor suitable for auditing purposes.

The log view is live: if you keep it open you can see individual data processing operations appearing there as you perform them.

A simple log example is shown in the following figure. For each operation, the type, name, parameters and time are recorded. The type can be for instance file import, data processing function or tool application. The function names correspond to those shown in the module browser (InfoModule Browser), where they are listed in Registered functions for each module; or in the on-line module browser. The parameter list represents the settings of the function at the time it was used. Since the log is only informative, the parameters may or may not allow a precise reconstruction of the operation. For typical simple operations, they should be sufficient. In the case of complex or interactive operations involving multiple data, the log entry may not be detailed enough. The time is recorded in the local time zone when the operation is performed; it is not recalculated when you send the files around the world and display elsewhere.

Log viewer showing a simple data processing operation log for an image, starting with file import from an SPM vendor format and continuing with the application of data processing functions, tools and undo.

The entire log can be exported to a text file using the Export button. It not possible to modify the log entries as that would defeat the purpose of logging somehow, but you can clear the entire log with Clear.

Disabling logging

In some circumstances, you may wish to store or publish .gwy files without logs. Therefore, logging is controllable on several levels:

  • It can be enabled and disabled globally using EditLogging Enabled. When logging is disabled no new log entries are added. Existing logs are not removed though and you can still view them. They are also still saved to .gwy files.

  • The log for a specific image, volume or XYZ data can be cleared with button Clear in the viewer.

  • All logs in the current file can be removed using FileRemove All Logs. As with any other file modification, the file needs to be saved afterwards for the log removal to have any effect on the on-disk file. And, of course, if logging is enabled and you start modifying the data, new logs will be created and the new data operations recorded in them.