Added a logging ability to the CLI class. Modified the examples to all use the logging function.