[bug #27948] Incorrect logging levels used in various places

View: New views
6 Messages — Rating Filter:   Alert me  

[bug #27948] Incorrect logging levels used in various places

by Oleg Tyshev :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


URL:
  <http://savannah.nongnu.org/bugs/?27948>

                 Summary: Incorrect logging levels used in various places
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: rossp
            Submitted on: Thu 05 Nov 2009 02:13:44 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release:
            lwIP version: 1.3.1

    _______________________________________________________

Details:

The debug.h header defines the 3 logging for warning, error and severe (plus
0 for debug tracing) but it is not used correctly in a number of places. A
good example is in pbuf.c; messages like the following are clearly
informational yet logged as severe:

LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE | 3,
("pbuf_alloc(length=%"U16_F")\n", length));






    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?27948>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
lwip-devel@...
http://lists.nongnu.org/mailman/listinfo/lwip-devel

[bug #27948] Incorrect logging levels used in various places

by Oleg Tyshev :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #1, bug #27948 (project lwip):

If you can hunt out the others, or at least most of them, and generate a
patch, that would be very helpful

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?27948>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
lwip-devel@...
http://lists.nongnu.org/mailman/listinfo/lwip-devel

RE: [bug #27948] Incorrect logging levels used in various places

by Ross Philipson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, here is a patch to fix the ones that I found. The only place I found any obvious ones was in pbuf.c but there are many parts of the lwIP I am not using so there could be others.

--

Patch to fix incorrect logging levels in pbuf.c.

Signed-off-by: Ross Philipson <ross.philipson@...>


-----Original Message-----
From: Kieran Mansley [mailto:INVALID.NOREPLY@...]
Sent: Thursday, November 05, 2009 9:24 AM
To: Kieran Mansley; Ross Philipson; lwip-devel@...
Subject: [bug #27948] Incorrect logging levels used in various places


Follow-up Comment #1, bug #27948 (project lwip):

If you can hunt out the others, or at least most of them, and generate a
patch, that would be very helpful

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?27948>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
lwip-devel@...
http://lists.nongnu.org/mailman/listinfo/lwip-devel

pbuf-trace.patch (4K) Download Attachment

RE: [bug #27948] Incorrect logging levels used in various places

by Ross Philipson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, here is a patch to fix the ones that I found. The only place I found any obvious ones was in pbuf.c but there are many parts of the lwIP I am not using so there could be others.

--

Patch to fix incorrect logging levels in pbuf.c.

Signed-off-by: Ross Philipson <ross.philipson@...>


-----Original Message-----
From: Kieran Mansley [mailto:INVALID.NOREPLY@...]
Sent: Thursday, November 05, 2009 9:24 AM
To: Kieran Mansley; Ross Philipson; lwip-devel@...
Subject: [bug #27948] Incorrect logging levels used in various places


Follow-up Comment #1, bug #27948 (project lwip):

If you can hunt out the others, or at least most of them, and generate a
patch, that would be very helpful

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?27948>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
lwip-devel@...
http://lists.nongnu.org/mailman/listinfo/lwip-devel

pbuf-trace.patch (4K) Download Attachment

[bug #27948] Incorrect logging levels used in various places

by Oleg Tyshev :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27948 (project lwip):

                  Status:                    None => In Progress            
             Assigned to:                    None => goldsimon              

    _______________________________________________________

Follow-up Comment #2:

Ross Philipson wrote (on lwip-devel):
> OK, here is a patch to fix the ones that I found. The only place
> I found any obvious ones was in pbuf.c but there are many parts
> of the lwIP I am not using so there could be others.

- When replying to bugs, please reply here in the bug tracker as it makes it
easier to find your response later

- The patch you attached removes LWIP_DBG_TRACE, which is not used in a wrong
way

What's really wrong (not only in pbuf.c) is to use code like "| 3": *if* a
logging level is provided, then the corresponding define must be used. We can
then search for the defines and see whether the logging level is used
correctly.

I just did that for pbuf.c and will do it for other files.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?27948>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
lwip-devel@...
http://lists.nongnu.org/mailman/listinfo/lwip-devel

[bug #27948] Incorrect logging levels used in various places

by Oleg Tyshev :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27948 (project lwip):

                  Status:             In Progress => Fixed                  
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #3:

Fised logging levels in etharp, dhcp, mem, memp, netif, raw, tcp_out, udp,
autoip an ip.c: they all used | 1, | 2 or | 3 -> converted correct define ore
removed where not applicable.

Thanks for reporting.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?27948>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/



_______________________________________________
lwip-devel mailing list
lwip-devel@...
http://lists.nongnu.org/mailman/listinfo/lwip-devel