[Nut-upsdev] PowerWare USB debug messages
Arnaud Quette
aquette.dev at gmail.com
Fri Jul 10 17:07:54 UTC 2009
2009/7/10 Arjen de Korte <nut+devel at de-korte.org <nut%2Bdevel at de-korte.org>>
> Citeren Charles Lepple <clepple at gmail.com>:
>
> 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.
>>
>
> I have no idea what ortogonal means here (sorry, English is not my native
> language). 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.
>
> 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.
>
> 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).
>>
>
> Neither have I, but see above. We should be conservative about what to
> write to the syslog.
I second Arjen's position here: I still have at least 2 Debian bugs related
to NUT (USB layer) spamming the syslog (though iirc related to the kernel
itself). Switching to LOG_DEBUG would ensure that we don't spam when it's
not "desired". Moreover, in such case (all the current LOG_ERR in nut_usb.c
are related to low level USB), there is nothing much we can do apart from
asking for a debug session.
and I'm all for adding the usb_strrerror() calls too.
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20090710/8329d012/attachment.htm>
More information about the Nut-upsdev
mailing list