Logging, etc.

Add some twisted logging support, and pretty-print the return value