aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Beaupré <anarcat@debian.org>2016-07-28 10:36:19 -0400
committerAntoine Beaupré <anarcat@debian.org>2016-07-28 10:36:19 -0400
commit5ebfea3b2759b02319bedb62964edbf3179ea7f2 (patch)
tree28b33c92392138f741886cbc38506e9ed7c0cb73
parentNeed to incrememt version in the right file. (diff)
downloadirker-5ebfea3b2759b02319bedb62964edbf3179ea7f2.tar.xz
do not hardcode syslog devices
in my specific use case (Debian Jessie), multiple of the candidates exist, which makes the whole thing *crash* because there are more than one candidates. regardless, we shouldn't have to guess where syslog can be: it's the stdlib's job to do the right thing and find the right device here. otherwise this should be configurable. so revert part of the previous commits and restore sanity.
-rwxr-xr-xirkerd9
1 files changed, 1 insertions, 8 deletions
diff --git a/irkerd b/irkerd
index 24abf08..65c831b 100755
--- a/irkerd
+++ b/irkerd
@@ -1000,16 +1000,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()