mirror of
https://github.com/sshuttle/sshuttle.git
synced 2024-11-22 07:53:43 +01:00
95ab6e7119
...MacOS X seems to default (in /etc/syslog.conf) to not logging daemon.info anywhere. That kind of defeats the purpose, I think.
17 lines
358 B
Python
17 lines
358 B
Python
import sys, os
|
|
from compat import ssubprocess
|
|
|
|
|
|
_p = None
|
|
def start_syslog():
|
|
global _p
|
|
_p = ssubprocess.Popen(['logger',
|
|
'-p', 'daemon.notice',
|
|
'-t', 'sshuttle'], stdin=ssubprocess.PIPE)
|
|
|
|
|
|
def stderr_to_syslog():
|
|
sys.stdout.flush()
|
|
sys.stderr.flush()
|
|
os.dup2(_p.stdin.fileno(), 2)
|