def get_syslog_facility():
    """Get syslog facility from ENV var"""
    facil = os.getenv('WALE_SYSLOG_FACILITY', 'user')

    valid_facility = True
    try:
        facility = handlers.SysLogHandler.facility_names[facil.lower()]
    except KeyError:
        valid_facility = False
        facility = handlers.SysLogHandler.LOG_USER

    return facility, valid_facility
def get_syslog_facility ( ) : facil = os . getenv ( 'WALE_SYSLOG_FACILITY' , 'user' ) valid_facility = True try : facility = handlers . SysLogHandler . facility_names [ facil . lower ( ) ] except KeyError : valid_facility = False facility = handlers . SysLogHandler . LOG_USER return facility , valid_facility
Get syslog facility from ENV var