[Nut-upsdev] PowerWare USB debug messages
clepple at gmail.com
Sat Jul 11 14:19:04 UTC 2009
On Fri, Jul 10, 2009 at 11:51 AM, Arjen de Korte<nut+devel at de-korte.org> wrote:
> Citeren Charles Lepple <clepple at gmail.com>:
>>> In most cases, I'd welcome more debugging output, especially in the case
>>> 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
>>> is fairly high and on many systems these messages will be logged to the
>> To me, the log level is orthogonal to the message printed at a given log
> I have no idea what ortogonal means here (sorry, English is not my native
Just that they are independent - if you are already logging one line
at a given log level, adding to the message won't change much.
> What I meant to say is, when configuring syslog usually it will
> log message from a specified level and higher. which messages to log and it
> will log all messages with that level and higher. Since LOG_ERR is ranked
> quite high, this might mean that if for some unfortunate reason
> usb_clear_halt() is called often, this will show up each time.
We don't have the cleanest namespace in NUT, but usb_clear_halt() is a
libusb function. (Not to be confused with NUT's libusb.c - argh...)
However, my original post was regarding nut_open(). Since the error
messages are only logged before the "goto errout" (which subsequently
calls fatalx()), it might be good if they are logged at LOG_ERR.
If nut_open() was called in the middle of a loop, I'd agree that we
should drop the log level down to LOG_DEBUG.
I think your reasoning applies to nutusb_comm_fail() in nut_usb.c, though.
> In this particular case, I don't think the ordinary sysadmin has any means
> to resolve this problem and since we've had quite some complaints about NUT
> 'spamming' the syslog before, I'd rather see things like this being logged
> at LOG_DEBUG (which is rarely used in a production environment and only then
> if there is a problem to be debugged).
>> If you have no objections to the message, I will add usb_strerror().
> Please do.
- Charles Lepple
More information about the Nut-upsdev