Info Editor Improvements Final Report

The main goal in my GSoC was:

  • to implement log viewer
  • side goal was to convert print to log, as many as I could
  • create python API for Blender log system and finally
  • expose some log/debug options in preferences.

I managed to create at least prototypes for all of my goal, they are currently under committed to review. During development I noticed place for minor improvements, for example that by introducing logs deprecates some parts of Report system (report is user oriented message), I dealt with it on the fly. As most of the features are under review, the best list of changes is in this code diff:



Blender log system is simple system (simpler than glog) what is not enough for complex 3d application. Blender logging system would benefit from improvements like ability to contextualize logs per render, graphical representation of blender graph structures (dependency graph), but it was not the focus of this project. In this project I got familiar with many log styles, created log viewer and converted many files to use blender's clog.

Blender is created by many individuals who have their favorite log method, most likely printf with some file-wide macro. As I was going through a lot of code I created best practices for logging proposal which summed up common log patterns for further discussion.

With growing use of logs, I wanted to make it easier to access them. I created interface for log and debug settings in user preferences. Unfortunately in early design I missed 3 important flaws of this design:

  1. preferences are read almost at the end of blender initialization, what means log and debug settings are applied really late
  2. debug flags often trigger special mechanism (ex. turn on memory debug) which must be applied early in startup
  3. there is conflict with command line argument

I managed to solve 3-rd problem, but not 1 and 2.

Blender UI is written in python which also makes extensive use of prints. Printing in python files is particularly tricky to track down as debugger will not stop in python files. That is why I designed python API for clog (T80072) and created prototype D8688.