02-12-2008
11,728,
1,345
Join Date: Feb 2004
Last Activity: 8 May 2020, 9:07 AM EDT
Location: NM
Posts: 11,728
Thanks Given: 903
Thanked 1,345 Times in 1,201 Posts
The syslog() function will write information to the syslog, if that's what you want.
man syslog
Add the syslog call to your existing C code. You don't need to pipe data. If it's only for debug purposes, you can system() a sed call to do the regex filtering - without having to write a sed-like clone.