[Nut-upsdev] PowerWare USB debug messages

Arjen de Korte nut+devel at de-korte.org
Fri Jul 10 08:21:03 UTC 2009


Citeren Charles Lepple <clepple op gmail.com>:

> 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.

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.

Best regards, Arjen
-- 
Please keep list traffic on the list




More information about the Nut-upsdev mailing list