Writing Scripting Toolkit logs to the console
The Foundation layer defines a logger with the nameGDL that can be used to capture logs about the requests made
to Granta MI.
To use this logger, first fetch the logger object either via the get_foundation_logger function, or by using the
Python logging module directly.
StreamHandler to the logger. A StreamHandler writes log messages to stderr.
Writing Scripting Toolkit logs to a file
If you would like to write logs to disk, you can use aFileHandler. In this example, use a timestamp to define a
unique file name for each execution of the script.
Additional Scripting Toolkit logging
The MI Scripting Toolkit underlying C libraries also perform their own additional logging separate to the Python logging. These logs can be found in the following locations:- Windows:
%LOCALAPPDATA%\Granta Design\MIScriptingToolkit - Linux:
~/.appdata/Granta Design/MIScriptingToolkit