def time_decorator(msg):
    """
    Decorates `msg` with current timestamp
    Args:
        msg(str): The log message from fabric
    Returns: 
        str: Original message prepended with current date time
    """
if '\n' not in msg and msg.strip():
    return '[%s] %s' % (time.asctime(), msg)
return msg
_original_flush = OutputLooper._flush
OutputLooper._flush = lambda self, msg: {_original_flush(self,
    time_decorator(msg))}

@task
def uptime():
    run('uptime')
Fabric log format to display date and time