'Write attributes of fabric.operations._AttributeString to a specified log file.'

def log_results(self, command, fabric_AttributeString, file_path):

    if os.path.exists(file_path):
        logfile = open(file_path, 'ab')
    else:
        logfile = open(file_path, 'wb')
    logfile.write('\n#############################################\n')
    logfile.write(('%s\nSTDOUT\n' % command))
    logfile.write(str(fabric_AttributeString.stdout))
    logfile.write('\n#############################################\n')
    logfile.write('\n#############################################\n')
    logfile.write(('%s\nSTDERR\n' % command))
    logfile.write(str(fabric_AttributeString.stderr))
    logfile.write('\n#############################################\n')
    logfile.close()
