human
I wrote the below code

    def decorate(func):
        logname = (name if name else func.__module__)
        log = logging.getLogger(logname)
        logmsg = (message if message else func.__name__)
        @wraps(func)
        def wrapper(*args, **kwargs):
            log.log(level, logmsg)
            return func(*args, **kwargs)
        return wrapper
    return decorate

What's a good function header?
assistant
#Here's a good function header.

def logged(level, name=None, message=None):