add logging.h

I've tested that the implementation works as expected but have not replaced any existing print statements or error handling at this point.

Fixes #64.