On Fri, Jul 10, 2009 at 4:21 AM, Arjen de Korte<[email protected]> wrote: > Citeren Charles Lepple <[email protected]>: > >> Earlier this year, I added a patch to my local NUT tree to >> additionally print the value of usb_strerror() if usb_clear_halt() >> failed. >> >> (Ignore the commented-out goto.) >> >> Since these messages are at the LOG_ERR level, should we add >> usb_strerror() to all of the calls in nut_usb.c? > > In most cases, I'd welcome more debugging output, especially in the case of > USB drivers. But in that case, I would rather see this logged at loglevel > LOG_DEBUG, to prevent flooding the syslog with messages. The LOG_ERR level > is fairly high and on many systems these messages will be logged to the > syslog.
To me, the log level is orthogonal to the message printed at a given log level. If you have no objections to the message, I will add usb_strerror(). If you would like me to change the log level at the same time, I can do that, but I don't have a strong opinion on that (probably because I haven't had my syslog flooded recently). > This also reminds me that we probably need to clean up some USB drivers, > that currently use upslog_with_errno and upsdebug_with_errno if libusb calls > fail, where we should really use upslogx and upsdebugx and append the output > of usb_strerror() instead. No objections here. -- - Charles Lepple _______________________________________________ Nut-upsdev mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
