CLOUDIFY-2199 - logging extracted to a method.