ENH: Added support for selective logging.