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?


From: Kieran Mansley
Subject: Re: [lwip-users] Consistent filtering of debug messages?
Date: Thu, 13 Nov 2008 13:56:09 +0000

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.

Kieran





reply via email to

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