Add some logging and pretty printing support