Added support for logging commands