Accessing the Execution Log¶

The code responsible for storing execution information is located in the “core/log” directories, and the code that generates much of that information is in “core/interpreter/”. Modules can add execution-specific annotations to provenance via annotate() calls during execution, but much of the data (like timing and errors) is captured by the LogController and CachedInterpreter (the execution engine) objects. To analyze the log from a vistrail (.vt) file, you might have something like the following:

import core.log.log
def run(fname):
 # open the .vt bundle specified by the filename "fname"
 bundle =[0]
 # get the log filename
 log_fname = bundle.vistrail.db_log_filename
 if log_fname is not None:
     # open the log
     log =, True)
     # convert the log from a db object
     for workflow_exec in log.workflow_execs:
         print 'workflow version:', workflow_exec.parent_version
         print 'time started:', workflow_exec.ts_start
         print 'time ended:', workflow_exec.ts_end
         print 'modules executed:', [i.module_id
                                     for i in workflow_exec.item_execs]
if __name__ == '__main__':

You should be able to see what information is available by looking at the “core/log” classes.