parent
9d94d3a329
commit
ea97c014b7
@ -52,10 +52,11 @@ def start():
|
|||||||
if os.path.exists(filename):
|
if os.path.exists(filename):
|
||||||
# Configuration taken from file
|
# Configuration taken from file
|
||||||
configure_from_file(filename, debug)
|
configure_from_file(filename, debug)
|
||||||
# Reload config on SIGHUP
|
# Reload config on SIGHUP (UNIX only)
|
||||||
def handler(signum, frame):
|
if hasattr(signal, 'SIGHUP'):
|
||||||
configure_from_file(filename, debug)
|
def handler(signum, frame):
|
||||||
signal.signal(signal.SIGHUP, handler)
|
configure_from_file(filename, debug)
|
||||||
|
signal.signal(signal.SIGHUP, handler)
|
||||||
else:
|
else:
|
||||||
# Default configuration, standard output
|
# Default configuration, standard output
|
||||||
handler = logging.StreamHandler(sys.stdout)
|
handler = logging.StreamHandler(sys.stdout)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user