lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lwip-users] Consistent filtering of debug messages? - Email found i


From: Tamas Somogyi
Subject: RE: [lwip-users] Consistent filtering of debug messages? - Email found in subject
Date: Fri, 14 Nov 2008 14:52:24 -0000

Kieran, Jonathan, thanks for your answers. If I understand well, the
conclusion is that there's no straightforward way to do it. Given that
there're approx 800 occurrences of LWIP_DEBUGF in lwip code, I would not
check every one (I don't have such comprehensive knowledge of lwip
either to categorize those messages), but it would be a nice and really
useful feature from lwip developers to provide a unified usage of debug
messages.

Tamas 


-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Jonathan Larmour
Sent: 13 November 2008 16:08
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Consistent filtering of debug messages? -
Email found in subject

Kieran Mansley wrote:
> On Thu, 2008-11-13 at 13:27 +0000, Tamas Somogyi wrote:
>> Hi All,
>>
>> I'd like to filter the debug messages coming through LWIP_DEBUGF and
>> display only the "important" ones, which indicate possible errors. It
>> would be quite useful for me, running on embedded system I'd like to
see
>> if something unexpected happens and needs attention - but on the
other
>> hand I'd like to suppress the tons of normal traces.
>>
>> I think that's the purpose of LWIP_DBG_LEVEL_WARNING,
>> LWIP_DBG_LEVEL_SERIOUS and LWIP_DBG_LEVEL_SEVERE constants, but I
>> noticed that these are interpreted differently in different files.
>> E.g. pbuf.c uses SEVERE for important -but normal- messages:
>>   LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE | 3,
("pbuf_alloc(length=...
>> while tcp_out.c indicates unexpected situation:
>>     LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 3, ("tcp_enqueue: too much data...

>>
>> The message type (trace, state...) should be used consistently as
well.
>>
>> Because of the abovementioned reasons, I cannot see any
straightforward
>> way to filter the messages. Can you please suggest a good, general
>> solution for keeping those messages only which indicate unexpected
>> situations?
> 
> I doubt there is a good solution for what you want other than to
change
> the messages that have the wrong log level.  The message you point out
> in pbuf.c that is using SEVERE for a mundane message is probably a
bug.
> If you find any more like it, I would welcome a patch to change them.

Not sure about that actually - it also includes LWIP_DBG_TRACE. I would
have thought the intent was to have a higher priority trace message,
should
tracing be on.

I think the problem is more general in the debug flag config.  Setting
LWIP_DBG_TYPES_ON seems slightly wonky; it only serves to restrict the
types to "trace", "state" or "fresh". But if you set it to anything
other
than LWIP_DBG_ON, you lose the normal messages too.


Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos
experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223
245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------
Opinions==mine


_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users




reply via email to

[Prev in Thread] Current Thread [Next in Thread]