added logging framework

Added logging stuff so we can have a bit more control over how verbose
the logging output should be.