I like the idea of a general error-reporting routine. It could be 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of jerry
scharf
Sent: Thursday, May 19, 2005 12:37 AM
To: [email protected]
Subject: [Owfs-developers] a start on the debugging stuff


Paul,

MY SBC version of linux doesn't run syslog, as there are a limited number 
of write cycles a flash gets, and it would be a waste to use those on 
syslog messages.

So my suggestion is as follows:
change the calls to syslog to something like owfs_syslog, and pass the same 
arguements. Then all you do is sed or perl to replace all the calls in one 
shot, then add a new subroutine.

My experience is to make a routine with each level of message and one for 
the extra arg that syslog wants. Then have them call the underlying routine 
with the message as an arg. In there, you can check the debug flag and 
decide whether to syslog it, log it to a file, send it to stdout/stderr... 
Those choices come from the command line, with the default being the same 
operation people get today. If you add the debug level check in here from 
the start, it will make adding more messaging very easy, just use sprintf 
to build a string, then pass that to the level of message you want.

I could put this together, but since it would impact so many files it makes 
more sense for someone "in the action" to add this. If you need any more 
specifics on how to do this, give me a shout. Once I get past the deadline 
I'm working on (hopefully less than a month,) I can start looking at adding 
the other levels of messaging.

thanks so much,
jerry


Jerry Scharf
laguna way consulting


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id344&op=click
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to