Ported over logger to new code

The logger has been ported over. It uses a separate Log class that
is not exported to the user but controlled fully through the
Logger getLog method. The Logger class will take care of all log
management.

Still needs tests.

Other changes:
- Fixed syntax error in base test