Logging module

An initial try on unifying logging and making verbosity configurable via environment variables. Feedback welcome.