Implement log output.