gui: avoid log to hog the GUI

Remove debug log that were causing the GUI to spend all its time updating the
log window, instead of updating the images.

Optimise the logging code... useless for now, but might be handy once it's
running at fixed intervals.