Reputation: 1705
Really basic Q. I come from largely working on Windows so, the vagueries of linux are still awaiting discovery by me. I have a centos 7 box, seems it has rsyslog. How do I send messages from a C++ program to syslog (or, rsyslog)? I have tried googling "linux log to syslog -logger -script" and it does not give me one single HOWTO reference. I get lots of "how to configure syslog to capture logs and send them to various files" type hits, but none to show how to use the logging mechanism itself. Looking for HOWTO's or illustrative code samples. Thanks!
Upvotes: 1
Views: 516
Reputation: 398
See the syslog(3)
man page for standard C Library functions and examples.
Upvotes: 2