我刚刚 npm install node-syslog 但它不起作用。
我有一个系统日志服务器(IP 地址和 local0)。
我正在寻找一个系统日志模块来帮助我将消息发布到系统日志。但我不知道我应该使用哪一个。请给我一些建议。谢谢。
哦..如果有一个好的系统日志解析器(node.js),也请告诉我。 :)
最佳答案
和你一样,我也在寻找 syslog 解决方案,直到我找到了这个意见:
Logs are a stream, and it behooves everyone to treat them as such. Your programs should log to stdout and/or stderr and omit any attempt to handle log paths, log rotation, or sending logs over the syslog protocol. Directing where the program’s log stream goes can be left up to the runtime container: a local terminal or IDE (in development environments), an Upstart / Systemd launch script (in traditional hosting environments), or a system like Logplex/Heroku (in a platform environment).
https://adam.herokuapp.com/past/2011/4/1/logs_are_streams_not_files/
现在我已经愉快地完成了我的搜索,并且正在使用 console.log
。
关于node.js - 需要对带有 Node.js 的 SysLog 的建议,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7604527/