Reporting: Logging does not work inside chart script

  1. Move your code to a project library script, and move all imports outside the def, along with the creation of the logger object (so it is persistent).

  2. In the first line inside the def, invoke the logger.

  3. Ideally, nest all the rest of the code in a double-except try: construct, so you can log both java and jython errors. Something like this: