如何使用rsyslog.conf将与linux相关的authentication信息发送到特定的进程
在我的系统中,我正在运行rsyslog守护进程。 我试图configurationsyslog.conf发送所有authentication邮件到一个特定的文件使用该行 auth.*;authpriv.* /var/log/AuthLogs 它的工作。 现在我想把这些消息发送给一个进程。 该进程将准备好捕获日志。 以前我使用的是syslogd守护进程。 在这我能够发送日志使用下面的行 auth.*;authpriv.* |exec /usr/bin/read.exe 但是rsyslogd不能正常工作。 有没有人有任何线索如何做到这一点? 更新 :特别是这个问题发生在python脚本ex代码中: #!/usr/local/bin/python import sys import fcntl, os message = sys.stdin.readline() # Read what's waiting, in one go if not message: print "nothing in message\n" fd = open('/tmp/testrsyslogomoutput1.txt', 'a') fd.write("Receiving log message : \n%s\n" % (message)) fd.close() 这个python代码,我想通过rsyslog调用。