Navigation


Changeset 965:9b37f34c1b1f in freeDiameter for libfdcore/sctp.c


Ignore:
Timestamp:
Mar 13, 2013, 1:23:37 AM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Some modifications to logging code:

  • Added a FD_LOG_NOTICE level for the logger function
  • Separated the internal debug levels (NONE, INFO, ...) from the "printlevel" for the logger
  • Renamed TRACE_DEBUG_ERROR to TRACE_ERROR for symetry
  • Renamed TRACE_DEBUG_BUFFER and TRACE_DEBUG_sSA. There take now the printlevel as parameter
  • Added new TRACE_NOTICE, fd_log_notice and fd_log_error macros.
  • sorry if I forgot some changes...
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/sctp.c

    r961 r965  
    748748                        fd_log_debug("Calling sctp_bindx with the following address array:\n");
    749749                        for (i = 0; i < count; i++) {
    750                                 TRACE_DEBUG_sSA(FULL, "    - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
     750                                TRACE_sSA(FD_LOG_DEBUG, FULL, "    - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
    751751                                ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6) ;
    752752                        }
     
    776776                fd_log_debug("SCTP server bound on :\n");
    777777                for (ptr.sa = sar; sz-- > 0; ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6)) {
    778                         TRACE_DEBUG_sSA(FULL, "    - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
     778                        TRACE_sSA(FD_LOG_DEBUG, FULL, "    - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
    779779                }
    780780                sctp_freeladdrs(sar);
     
    842842                ptr.buf = sar.buf;
    843843                for (i=0; i< count; i++) {
    844                         TRACE_DEBUG_sSA(FULL, "  - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
     844                        TRACE_sSA(FD_LOG_DEBUG, FULL, "  - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
    845845                        ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6);
    846846                }
     
    11511151                        case SCTP_PEER_ADDR_CHANGE:
    11521152                                TRACE_DEBUG(FULL, "Received SCTP_PEER_ADDR_CHANGE notification");
    1153                                 TRACE_DEBUG_sSA(SCTP_LEVEL, "    intf_change : ", &(notif->sn_paddr_change.spc_aaddr), NI_NUMERICHOST | NI_NUMERICSERV, "" );
     1153                                TRACE_sSA(FD_LOG_DEBUG, SCTP_LEVEL, "    intf_change : ", &(notif->sn_paddr_change.spc_aaddr), NI_NUMERICHOST | NI_NUMERICSERV, "" );
    11541154                                TRACE_DEBUG(SCTP_LEVEL, "          state : %d", notif->sn_paddr_change.spc_state);
    11551155                                TRACE_DEBUG(SCTP_LEVEL, "          error : %d", notif->sn_paddr_change.spc_error);
Note: See TracChangeset for help on using the changeset viewer.