I haven't put much effort into how the logging behaves. There are a couple of calls to `print()` that should probably be removed.