同时写入多个系统日志设施?
是否可以让一个应用程序同时写入多个系统日志设施?
我有一个用 C/C++ 编写的应用程序,我想将一些消息写入 local0,将其他消息写入 local1。我不希望 local0 的消息出现在 local1 中,反之亦然。
Is it possible to have one application simultaneously write to multiple syslog facilities?
I have an application, written in C/C++, that I would like to write some messages to local0 and other messages to local1. I do not want the messages for local0 to appear in local1 or vice versa.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看 syslog 的手册页,我看到了示例:
Does
work?
Looking at the man page for
syslog
, I see the example:Does
work?
您无法通过一次调用来完成此操作。您必须为每个设施拨打电话。
You can't do it in a single call. You'll have to make a call for each facility.