detecting errors in writing to syslog


 
Thread Tools Search this Thread
Top Forums Programming detecting errors in writing to syslog
# 1  
Old 10-17-2005
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
# 2  
Old 10-17-2005
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?
# 3  
Old 10-17-2005
Note that according to Posix,
Quote:
It is not necessary to call openlog() prior to calling syslog().
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. HP-UX

Errors in syslog

These errors keep generating in the syslog which is quite annoying for monitoring for other errors as these are flooding it. Anyone know how to resolve these? Help appreciated. cimservera: user2netname: unknown nameservice ^I^I^I^I^Ifor publickey info 'ldap' Nov 19 13:31:30 server1 sshd:... (4 Replies)
Discussion started by: lcclaj0
4 Replies

2. AIX

I see some errors in syslog files in AIX. can these be ignored ?

Hello, Could you please check the below errors. I found these errors in AIX LPAR syslogs. auth|security:err|error sshd error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key daemon:err|error syslog: slp: 0660-059 Impossible to get local interface for distant address 10.x.x.x. errno... (2 Replies)
Discussion started by: Kumar7997
2 Replies

3. Shell Programming and Scripting

need help in detecting errors

Hi All , I need a script to find errors in a particular and in a particular path Actually in my logs i`ve so many kinds of errors(i can even say as 100 types also).if i run the script i need to know the error (some errors can aviod ) so finally the script o/p should be a numeric... (3 Replies)
Discussion started by: radha254
3 Replies

4. Shell Programming and Scripting

help writing a scipt to search for errors.

Hi, I am a beginner unix user. I would appreciate any help you guys can provide me with. What I am looking to do is the following. I have a log file that gets generated every morning. Example: /home/me/folder/temp.log temp.log will say "Socket connected" if the connection was successful,... (4 Replies)
Discussion started by: Jeffenri
4 Replies

5. AIX

Syslog Errors

Cuando ejecuto cualquier comando con un usuario diferente al root en un equipo con AIX6.1, el syslog no me registra las acciones del usuario y en su defecto al usuario le reporta el mensaje Could not send msg SESSION = 426190, CMD = l . Please retry Esto ocurre para cualquier comando y... (1 Reply)
Discussion started by: salacho
1 Replies

6. UNIX for Advanced & Expert Users

writing the log file into syslog

Hi, we are trying to enable auditing for few oracle 9i database. and right now it writies into adump directory. As adump can be read/write by oracle user so could it be possible to write into syslog while oracle keeps writing to adump . thanks in advance. Pk (2 Replies)
Discussion started by: p4cldba
2 Replies

7. Solaris

Detecting Harddrive Errors

I am looking for some tips or suggestions in how to do the following. 1) From a Solaris server, I run the command iostat -En and receive output that is similiar to the following which shows your disks along with the cdrom/dvdrom: c0t2d0 Soft Errors: 0 Hard Errors: 0 Transport... (1 Reply)
Discussion started by: sunsysadm2003
1 Replies

8. Shell Programming and Scripting

Detecting hard or soft disk errors in Solaris

I am looking for some tips or suggestions in how to do the following. 1) From a Solaris server, I run the command iostat -En and receive output that is similiar to the following which shows your disks along with the cdrom/dvdrom: c0t2d0 Soft Errors: 0 Hard Errors: 0 Transport... (1 Reply)
Discussion started by: sunsysadm2003
1 Replies

9. Programming

writing to multiple syslog facilities

is there a way to allow one application to simultaneously write to multiple syslog facilities? (1 Reply)
Discussion started by: dmirza
1 Replies
Login or Register to Ask a Question