Implemented logging.

Change-Id: I66e8af43a45a32e2e81d6154da3f8ef43a77a7a6