Writing to the debug log (Python)

Writing to the debug log (Python)
 1# This example demonstrates writing to the impact debug impact.log
 2
 3def Logger(msg):
 4    if not impact is None:
 5        # add message to impact debug impact.log (if it is enabled)
 6        if not impact.log.isNone():
 7            impact.log.add("### " + msg)
 8        # also add message to Output Toolbox
 9        if not impact.gui.isNone():
10            impact.gui.output_toolbox.add(msg)
11
12Logger("Testing")