Improve logging mechanism.
Update documentation with logging information.