the final log processor that structlog requires to render.

def define_log_renderer(fmt, fpath, quiet):
    """
    the final log processor that structlog requires to render.
    """
    # it must accept a logger, method_name and event_dict (just like processors)
    # but must return the rendered string, not a dictionary.
    # TODO tty logic

    if fmt:
        return structlog.processors.JSONRenderer()

    if fpath is not None:
        return structlog.processors.JSONRenderer()

    if sys.stderr.isatty() and not quiet:
        return structlog.dev.ConsoleRenderer()

    return structlog.processors.JSONRenderer()