Added a logging parameter.