Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

syslog functions

Status
Not open for further replies.

simanek

Programmer
Jan 19, 2001
137
US
Hi all,

I'm currently working on a solaris 8 box and am trying to write a custom logging script in C. Basically, I'm using syslog to write to different files. The basic steps that I'm performing are these:
1. openlog ("imapd",LOG_PID,LOG_MAIL);
2. syslog (LOG_INFO, "attempted connect");
3. closelog();
4. openlog ("imapd",LOG_PID,LOG_LOCAL3);
5. syslog (LOG_INFO, "failed authentication");

However, this doesn't work so well. As you can see I want the first syslog (#2) to go to mail.info in my syslog.conf file and the second syslog (#5) to go to local3.info. But it doesn't. My script just hangs when I hit step 3. Any advice? Thanks. Mike
~~~~
"It's a Swingline!"
~~~~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top