def METHOD_NAME(u, msg, request=None, warn_color=True):
    msg = smart_str(msg)
    if not u:
        return debug(msg)
    platform = '------'
    time_elapsed = ""
    if isinstance(u, WSGIRequest) or request:
        if not request:
            request = u
            u = request.METHOD_NAME
        platform = extract_user_agent(request)
        if hasattr(request, 'start_time'):
            seconds = time.time() - request.start_time
            color = '~FB'
            if warn_color:
                if seconds >= 5:
                    color = '~FR'
                elif seconds > 1:
                    color = '~SB~FK'
            time_elapsed = "[%s%.4ss~SB] " % (
                color,
                seconds,
            )
    is_premium = u.is_authenticated and u.profile.is_premium
    premium = '*' if is_premium else ''
    if is_premium and u.profile.is_archive:
        premium = "^"
    username = cipher(str(u)) if settings.CIPHER_USERNAMES else str(u)
    info(' ---> [~FB~SN%-6s~SB] %s[%s%s] %s' % (platform, time_elapsed, username, premium, msg))