According to our logging conversation your point is that run_remote_chef_client should use some logger instead of redefining stdout a logfile? Whats wrong with redefining stdout? This method should be refactored?