Added the logging system.

Added the logging system.