MCPcopy Create free account
hub / github.com/wal-e/wal-e / get_syslog_facility

Function get_syslog_facility

wal_e/log_help.py:118–129  ·  view source on GitHub ↗

Get syslog facility from ENV var

()

Source from the content-addressed store, hash-verified

116
117
118def get_syslog_facility():
119 """Get syslog facility from ENV var"""
120 facil = os.getenv('WALE_SYSLOG_FACILITY', 'user')
121
122 valid_facility = True
123 try:
124 facility = handlers.SysLogHandler.facility_names[facil.lower()]
125 except KeyError:
126 valid_facility = False
127 facility = handlers.SysLogHandler.LOG_USER
128
129 return facility, valid_facility
130
131
132def set_level(level):

Callers 1

configureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected