Changeset 54a0070 in mainline for uspace/srv/net/udp/udp_inet.c


Ignore:
Timestamp:
2012-09-10T09:54:09Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
40b5421
Parents:
1dbd189 (diff), 42bde6a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~vojtech-horky/helenos/logging

All logging is controlled by the logger service.

The API allows to create hierarchical logs and each log_msg()
must specify which log to use.

It is possible to change reported log level at runtime via
logset utility or at boot time through GRUB parameters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/udp/udp_inet.c

    r1dbd189 r54a0070  
    6161        udp_pdu_t *pdu;
    6262
    63         log_msg(LVL_DEBUG, "udp_inet_ev_recv()");
     63        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_inet_ev_recv()");
    6464
    6565        pdu = udp_pdu_new();
     
    6969        pdu->src.ipv4 = dgram->src.ipv4;
    7070        pdu->dest.ipv4 = dgram->dest.ipv4;
    71         log_msg(LVL_DEBUG, "src: 0x%08x, dest: 0x%08x",
     71        log_msg(LOG_DEFAULT, LVL_DEBUG, "src: 0x%08x, dest: 0x%08x",
    7272            pdu->src.ipv4, pdu->dest.ipv4);
    7373
     
    8484        inet_dgram_t dgram;
    8585
    86         log_msg(LVL_DEBUG, "udp_transmit_pdu()");
     86        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_transmit_pdu()");
    8787
    8888        dgram.src.ipv4 = pdu->src.ipv4;
     
    9494        rc = inet_send(&dgram, INET_TTL_MAX, 0);
    9595        if (rc != EOK)
    96                 log_msg(LVL_ERROR, "Failed to transmit PDU.");
     96                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed to transmit PDU.");
    9797
    9898        return rc;
     
    105105        udp_sockpair_t rident;
    106106
    107         log_msg(LVL_DEBUG, "udp_received_pdu()");
     107        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_received_pdu()");
    108108
    109109        if (udp_pdu_decode(pdu, &rident, &dmsg) != EOK) {
    110                 log_msg(LVL_WARN, "Not enough memory. PDU dropped.");
     110                log_msg(LOG_DEFAULT, LVL_WARN, "Not enough memory. PDU dropped.");
    111111                return;
    112112        }
     
    124124        int rc;
    125125
    126         log_msg(LVL_DEBUG, "udp_inet_init()");
     126        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_inet_init()");
    127127
    128128        rc = inet_init(IP_PROTO_UDP, &udp_inet_ev_ops);
    129129        if (rc != EOK) {
    130                 log_msg(LVL_ERROR, "Failed connecting to internet service.");
     130                log_msg(LOG_DEFAULT, LVL_ERROR, "Failed connecting to internet service.");
    131131                return ENOENT;
    132132        }
Note: See TracChangeset for help on using the changeset viewer.