Better logging infrastructure
Allow configuration of the log level at the command line
Add documentation for logging