Improved agent logging.