ENH: Improved logging for easier troubleshooting
When users report a crash we need to ask a lot of questions (what operating system, Slicer version is used, how much memory is in the computer, how large images are loaded, what module was used, etc). Instead, we will be able to just ask them to provide the application log, as it will contain all these information. Lots of useful information is included now and as we identify further important troubleshooting data, those should be added to the application log, too.
- Added vtkInfoMacro logging macro, that logs an INFO message from VTK objects. vtkDebugMacro was not usable for information logging, as it only logs the message if debug is enabled for the particular object (also, typically debug output contains many low-level details).
- Added more detailed system and application info logging (operating system, memory, CPU, additional module paths, developer mode flag, executable CLI preference flag).
- Fixed system info logging for Windows (vtksys computes returns incorrect virtual memory size and number of physical CPUs).
- Log whenever user switches to another module (in case of a crash we know then what module was active).
- Log loaded volume size (this allows us to see if the volume size is very large compared to the available memory), for example: vtkMRMLVolumeArchetypeStorageNode (000000DC38FDF230): Loaded volume from file: C:/S4/Libs/MRML/Core/Testing/TestData/fixed.nrrd. Dimensions: 65x65x32. Number of components: 1. Pixel type: short.