Logging error messages in a Daemon Program
- From: mshetty@xxxxxxxx
- Date: 29 Dec 2005 07:18:35 -0800
Hi,
I am converting an existing application into a daemon program. I have a
query on error message logging. Since the application creates daily
logs its does not use syslog, instead all message a logged in a log
file.
I am trying to figure out the best way to inform the user of an error,
under conditions where the application is not able to open/create a log
file.
One of the ways I found on the net is to re-direct it to /dev/console.
Are there any other ways of doing it?
Currently I am not closing stderr. Incase log file open fails all error
messages are directed to stderr. While running the daemon I redirect
stderr to a file.
What problems could arise on doing this? (other than losing messages
when stderr is not redirected)
Would help if I could some input on the above.
Thanks and Regards,
M Shetty
.
- Follow-Ups:
- Re: Logging error messages in a Daemon Program
- From: Rich Teer
- Re: Logging error messages in a Daemon Program
- Prev by Date: Re: how to use rar with mknod ?
- Next by Date: Re: Casting between 64bit and 32bit
- Previous by thread: Remote synchronization
- Next by thread: Re: Logging error messages in a Daemon Program
- Index(es):
Relevant Pages
|
|