The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Major OS errors/Bash errors help!!!! wcmmlynn UNIX for Dummies Questions & Answers 12 11-13-2007 01:50 AM
Detecting Second disk dragunu UNIX for Dummies Questions & Answers 7 02-09-2007 01:45 AM
writing to multiple syslog facilities dmirza High Level Programming 1 10-25-2005 02:52 PM
Adapter Errors and Link Errors mcastill66 AIX 2 08-02-2005 03:51 PM
Adapter Errors and Link Errors mcastill66 UNIX for Advanced & Expert Users 0 08-02-2005 03:11 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 10-17-2005
Registered User
 

Join Date: Oct 2005
Posts: 7
detecting errors in writing to syslog

I am calling "void syslog(int, const char *, ...);" from my c++ application (definition taken from man page for syslog.h". Is there any way to detect that the syslog is not working, so that I can re-direct logging information to stderr?

Thanks in advance.

David
Reply With Quote
Forum Sponsor
  #2  
Old 10-17-2005
Registered User
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 979
It appears not. Which makes sense, in a way; this is the error logger, if it doesn't work, there's nothing to report an error to. Just to rule out the obvious, your're calling openlog before using syslog, yes?
Reply With Quote
  #3  
Old 10-17-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,616
Note that according to Posix,
Quote:
It is not necessary to call openlog() prior to calling syslog().
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:43 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0