syslog


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users syslog
# 1  
Old 02-12-2008
syslog

I have the program that prints to STDOUT some debug info. I need to run this program like daemon (with the help of nohup). To see debug info I need to add strings from STDOUT to syslog, i.e. ./program | ./to-syslog some-regexp-to-filter-input.
The question is are there some standard solutions for this problem?
# 2  
Old 02-12-2008
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.
# 3  
Old 02-12-2008
you might use "logger" for this, I have no experience with logging STDOUT to logger but this may be something worth to give it a look.
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. AIX

Cannot send syslog event from AIX 6.1 to RHEL Syslog server

Hi everyone, I am trying to configure AIX 6.1 using syslogd to send syslog event to syslog server configured on RHEL. However, RHEL never receives the events. I have tried to redirect the syslog event on AIX to a local file and successful. Only forwarding to remote server fails. Firewall... (10 Replies)
Discussion started by: michael_hoang
10 Replies

2. Solaris

Which are the available entries to forward syslog in syslog.conf?

Hi Community Which are the available entries to forward syslog in syslog.conf i have put *.err;kern.debug;daemon.notice;mail.crit;user.alert;user.emerg;kern.notice;auth.notice;kern.warning @172.16.200.50 and it's not going through.giving error message like below: syslogd:... (2 Replies)
Discussion started by: bentech4u
2 Replies
Login or Register to Ask a Question