It just occurred to me that you don't have to log to a file. We already have a way to capture the logging output, see `use_log_level` e.g.:

https://github.com/vispy/vispy/blob/master/vispy/util/tests/test_logging.py#L30