add support for logging