Custom logger support.

Custom logger is useful feature, can be used for log4js or some other
log system. Colorful log message can be implemented by custom logger.