lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Consistent filtering of debug messages?


From: Tamas Somogyi
Subject: [lwip-users] Consistent filtering of debug messages?
Date: Thu, 13 Nov 2008 13:27:29 -0000

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?


Best Regards, 
Tamas 




reply via email to

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