diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2018-06-14 14:29:46 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2018-06-14 14:29:46 +0000 |
commit | 0de9a1e59ea9da9eb800d924c4bb94f4561c131f (patch) | |
tree | de741b674e95a1d62a80299c6f9cbfe1123c94c1 | |
parent | Merge branch 'bugs/drop_event_handler_sorting' into 'master' (diff) | |
parent | do not hardcode syslog devices (diff) | |
download | irker-0de9a1e59ea9da9eb800d924c4bb94f4561c131f.tar.xz |
do not hardcode syslog devices
See merge request esr/irker!11
-rwxr-xr-x | irkerd | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -1001,16 +1001,9 @@ if __name__ == '__main__': args = parser.parse_args() if not args.log_file and in_background(): - # The Linux, Mac, and FreeBSD values of the logging device. - logdev = [x for x in ('/dev/log', '/var/run/syslog', '/var/run/log') - if os.path.exists(x) and not os.path.isdir(x)] - if len(logdev) != 1: - sys.stderr.write("can't initialize log device, bailing out!\n") - raise SystemExit(1) # There's a case for falling back to address = ('localhost', 514) # But some systems (including OS X) disable this for security reasons. - handler = logging.handlers.SysLogHandler(address=logdev[0], - facility='daemon') + handler = logging.handlers.SysLogHandler(facility='daemon') else: handler = logging.StreamHandler() |