Skip to content
Snippets Groups Projects
Commit 23101617 authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

Also autodetect the right logging device under FreeBSD: /var/run/syslog

parent c8cdf026
No related branches found
No related tags found
No related merge requests found
irker history
Repository head:
Also autodetect the right logging device under FreeBSD: /var/run/syslog
2.11: 2014-06-20
With -i, message string argument now optional, stdin is read if it is absent.
Auto-adapt to BSD & OS X log device as well as Linux's.
......
......@@ -981,8 +981,8 @@ if __name__ == '__main__':
args = parser.parse_args()
if not args.log_file and in_background():
# The Linux and BSD values of the logging device
logdev = [x for x in ('/dev/log', '/var/run/syslog')
# 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)]
if len(logdev) != 1:
sys.stderr.write("can't initialize log device, bailing out!\n")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment