Results 1 to 2 of 2
Hi,
In programming, how to write error messages. I dont want to use printf's in all the threads as it is blocking function.
What is the general way of logging ...
- 01-27-2008 #1Just Joined!
- Join Date
- Dec 2007
- Posts
- 28
logging error messages
Hi,
In programming, how to write error messages. I dont want to use printf's in all the threads as it is blocking function.
What is the general way of logging messages. It will be of great help if you suggest me some good documentation.
Thanks in advance
- 01-27-2008 #2Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
Depends on the program, really, if it's an interactive one then outputting to stderr is appropriate, if it's a daemon then logging to a file is the way to go. If you're in a blocking thread, dump the message in shared memory and signal a message-handling thread to go handle it.


Reply With Quote