On Tue, Sep 01, 2009 at 07:26:47PM +0000, Mike Shapiro wrote: > On Tue, Sep 01, 2009 at 11:50:17AM -0700, Jordan Brown wrote: > > ... > > Agree with your list. What is really needed is the floor wax > and the dessert topping. There's a missing project which is > a common, sensible API for error reporting, that would among other things:
:) > - If $SMF_FMRI is set, use stderr appropriately Certainly all errors and warnings up until initialization completes or fails. After that any additional logging to stderr/stdout runs into the log rotation issue. > - ... > I started something like the first part in fmd when I wrote that: > cscope for fmd_verror() to see at least a few of the above things. Such a library would be great. I like your dessert topping list, but we should want an option for code that's not going to use an interface like the one you described. Imagine an attribute (ioctl?) on named pipes that causes the pipe to discard contents when there's no reader. Then SMF could set the stdour/stderr of every start method to be such a named pipe, and a service could read from all those named pipes and route to: rotateable service log files, syslog, ... > I'd like to see some of the folks in Fishworks and elsewhere in > our org collaborate on this. When I think about how we should do > error reporting when CIFS and Kerberos talk to each other, this is > where I really see an increasing need for something like this. I agree, but anything to do with FOSS (libldap, libsasl, SASL, Kerberos, OpenSSL, ...) immediately gets complicated. There are things that can be done simply enough, and others that can't be done without upstream negotiation or forking. (I'm not trying to be a naysayer, just setting expectations.) The good news is that a few changes in libldap will go a _long_ way -- libldap is the most gratouitous obfuscator of error messages that we have. Nico --