Logging

Added logging support.