def METHOD_NAME(args):
    # set log level
    if not args.debug_mode:
        log_level = {
            'debug': logging.DEBUG,
            'info': logging.INFO,
            'warn': logging.WARN,
            'error': logging.ERROR,
            'critical': logging.CRITICAL,
        }[args.log_level.lower()]
    else:
        log_level = logging.DEBUG
    logging.basicConfig(level=log_level)
    # syslog priorities
    if args.syslog_priorities == 'always':
        syslog_priorities = True
    elif args.syslog_priorities == 'no':
        syslog_priorities = False
    elif args.syslog_priorities == 'auto':
        syslog_priorities = journald_is_running()
    # setup log formatting and log filtering
    log_formatter = LogFormatter(syslog_priorities=syslog_priorities)
    log_filter = LogFilter()
    for handler in logging.getLogger().root.handlers:
        handler.setFormatter(log_formatter)
        handler.addFilter(log_filter)
    if args.debug_mode:
        if args.debug_mode == 'messages':
            log_filter.include('lona.server.websockets')
        elif args.debug_mode == 'views':
            log_filter.include('lona.views')
        elif args.debug_mode == 'input-events':
            log_filter.include('lona.input_events')
        elif args.debug_mode == 'view-events':
            log_filter.include('lona.view_events')
    elif args.loggers:
        for logger_name in args.loggers:
            if logger_name.startswith('_'):
                log_filter.exclude(logger_name[1:])
            else:
                if logger_name.startswith('+'):
                    logger_name = logger_name[1:]
                log_filter.include(logger_name)
    return log_formatter, log_filter