From 4c68f68b07882f8025aacc409783a2dfb410d422 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Tue, 20 Jun 2017 18:26:31 +0200 Subject: [PATCH] Logging fixes --- core/net/ipv6/ipv6-log.h | 53 ------------------------- core/net/ipv6/websocket.c | 2 +- core/net/mac/framer/frame802154e-ie.c | 44 ++++++++++---------- core/net/mac/framer/framer-802154.c | 32 ++++++--------- core/net/mac/tsch/tsch-log.h | 18 ++++----- core/net/mac/tsch/tsch-packet.c | 4 +- core/net/mac/tsch/tsch-queue.c | 1 + core/net/mac/tsch/tsch-slot-operation.c | 9 +---- core/net/mac/tsch/tsch.c | 2 +- core/sys/log-conf.h | 8 +++- core/sys/log.c | 52 ------------------------ core/sys/log.h | 12 +++--- 12 files changed, 63 insertions(+), 174 deletions(-) delete mode 100644 core/net/ipv6/ipv6-log.h delete mode 100644 core/sys/log.c diff --git a/core/net/ipv6/ipv6-log.h b/core/net/ipv6/ipv6-log.h deleted file mode 100644 index 567e74cee..000000000 --- a/core/net/ipv6/ipv6-log.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2009, Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * This file is part of the Contiki operating system. - * - */ - -/** - * \file - * Default log levels for a number of modules - * \author - * Simon Duquennoy - */ - -/** \addtogroup uip6 - * @{ */ - -#ifndef __IPV6_LOG_CONF_H__ -#define __IPV6_LOG_CONF_H__ - -/* Log configuration */ -#include "sys/log.h" -#define LOG_MODULE_STR "IPv6" -#define LOG_LEVEL IPV6_LOG_LEVEL - -#endif /* __IPV6_LOG_CONF_H__ */ - -/** @} */ diff --git a/core/net/ipv6/websocket.c b/core/net/ipv6/websocket.c index 4202efde3..b8f454682 100644 --- a/core/net/ipv6/websocket.c +++ b/core/net/ipv6/websocket.c @@ -626,7 +626,7 @@ send_data(struct websocket *s, const void *data, if(datalen > sizeof(buf) - 4 - 4) { LOG_ERR("trying to send too large data chunk %d > %d\n", - datalen, sizeof(buf) - 4 - 4); + datalen, (int)sizeof(buf) - 4 - 4); return -1; } diff --git a/core/net/mac/framer/frame802154e-ie.c b/core/net/mac/framer/frame802154e-ie.c index 8a06291ab..8fe26b3a6 100644 --- a/core/net/mac/framer/frame802154e-ie.c +++ b/core/net/mac/framer/frame802154e-ie.c @@ -40,8 +40,10 @@ #include #include "net/mac/framer/frame802154e-ie.h" -#define DEBUG DEBUG_NONE -#include "net/net-debug.h" +/* Log configuration */ +#include "sys/log.h" +#define LOG_MODULE_STR "Frame 802.15.4e" +#define LOG_LEVEL FRAMER_LOG_LEVEL /* c.f. IEEE 802.15.4e Table 4b */ enum ieee802154e_header_ie_id { @@ -470,27 +472,27 @@ frame802154e_parse_information_elements(const uint8_t *buf, uint8_t buf_size, buf_size -= 2; buf += 2; type = ie_desc & 0x8000 ? 1 : 0; /* b15 */ - PRINTF("frame802154e: ie type %u, current state %u\n", type, parsing_state); + LOG_DBG("ie type %u, current state %u\n", type, parsing_state); switch(parsing_state) { case PARSING_HEADER_IE: if(type != 0) { - PRINTF("frame802154e: wrong type %04x\n", ie_desc); + LOG_ERR("wrong type %04x\n", ie_desc); return -1; } /* Header IE: 2 bytes descriptor, c.f. fig 48n in IEEE 802.15.4e */ len = ie_desc & 0x007f; /* b0-b6 */ id = (ie_desc & 0x7f80) >> 7; /* b7-b14 */ - PRINTF("frame802154e: header ie len %u id %x\n", len, id); + LOG_DBG("header ie len %u id %x\n", len, id); switch(id) { case HEADER_IE_LIST_TERMINATION_1: if(len == 0) { /* End of payload IE list, now expect payload IEs */ parsing_state = PARSING_PAYLOAD_IE; ies->ie_payload_ie_offset = buf - start; /* Save IE header len */ - PRINTF("frame802154e: list termination 1, look for payload IEs\n"); + LOG_DBG("list termination 1, look for payload IEs\n"); } else { - PRINTF("frame802154e: list termination 1, wrong len %u\n", len); + LOG_ERR("list termination 1, wrong len %u\n", len); return -1; } break; @@ -498,15 +500,15 @@ frame802154e_parse_information_elements(const uint8_t *buf, uint8_t buf_size, /* End of IE parsing */ if(len == 0) { ies->ie_payload_ie_offset = buf - start; /* Save IE header len */ - PRINTF("frame802154e: list termination 2\n"); + LOG_DBG("list termination 2\n"); return buf + len - start; } else { - PRINTF("frame802154e: list termination 2, wrong len %u\n", len); + LOG_ERR("list termination 2, wrong len %u\n", len); return -1; } default: if(len > buf_size || frame802154e_parse_header_ie(buf, len, id, ies) == -1) { - PRINTF("frame802154e: failed to parse\n"); + LOG_ERR("failed to parse\n"); return -1; } break; @@ -514,26 +516,26 @@ frame802154e_parse_information_elements(const uint8_t *buf, uint8_t buf_size, break; case PARSING_PAYLOAD_IE: if(type != 1) { - PRINTF("frame802154e: wrong type %04x\n", ie_desc); + LOG_ERR("wrong type %04x\n", ie_desc); return -1; } /* Payload IE: 2 bytes descriptor, c.f. fig 48o in IEEE 802.15.4e */ len = ie_desc & 0x7ff; /* b0-b10 */ id = (ie_desc & 0x7800) >> 11; /* b11-b14 */ - PRINTF("frame802154e: payload ie len %u id %x\n", len, id); + LOG_DBG("payload ie len %u id %x\n", len, id); switch(id) { case PAYLOAD_IE_MLME: /* Now expect 'len' bytes of MLME sub-IEs */ parsing_state = PARSING_MLME_SUBIE; nested_mlme_len = len; len = 0; /* Reset len as we want to read subIEs and not jump over them */ - PRINTF("frame802154e: entering MLME ie with len %u\n", nested_mlme_len); + LOG_DBG("entering MLME ie with len %u\n", nested_mlme_len); break; case PAYLOAD_IE_LIST_TERMINATION: - PRINTF("frame802154e: payload ie list termination %u\n", len); + LOG_DBG("payload ie list termination %u\n", len); return (len == 0) ? buf + len - start : -1; default: - PRINTF("frame802154e: non-supported payload ie\n"); + LOG_ERR("non-supported payload ie\n"); return -1; } break; @@ -544,30 +546,30 @@ frame802154e_parse_information_elements(const uint8_t *buf, uint8_t buf_size, /* Short sub-IE, c.f. fig 48r in IEEE 802.15.4e */ len = ie_desc & 0x00ff; /* b0-b7 */ id = (ie_desc & 0x7f00) >> 8; /* b8-b14 */ - PRINTF("frame802154e: short mlme ie len %u id %x\n", len, id); + LOG_DBG("short mlme ie len %u id %x\n", len, id); if(len > buf_size || frame802154e_parse_mlme_short_ie(buf, len, id, ies) == -1) { - PRINTF("frame802154e: failed to parse ie\n"); + LOG_ERR("failed to parse ie\n"); return -1; } } else { /* Long sub-IE, c.f. fig 48s in IEEE 802.15.4e */ len = ie_desc & 0x7ff; /* b0-b10 */ id = (ie_desc & 0x7800) >> 11; /* b11-b14 */ - PRINTF("frame802154e: long mlme ie len %u id %x\n", len, id); + LOG_DBG("long mlme ie len %u id %x\n", len, id); if(len > buf_size || frame802154e_parse_mlme_long_ie(buf, len, id, ies) == -1) { - PRINTF("frame802154e: failed to parse ie\n"); + LOG_ERR("failed to parse ie\n"); return -1; } } /* Update remaining nested MLME len */ nested_mlme_len -= 2 + len; if(nested_mlme_len < 0) { - PRINTF("frame802154e: found more sub-IEs than initially advertised\n"); + LOG_ERR("found more sub-IEs than initially advertised\n"); /* We found more sub-IEs than initially advertised */ return -1; } if(nested_mlme_len == 0) { - PRINTF("frame802154e: end of MLME IE parsing\n"); + LOG_DBG("end of MLME IE parsing\n"); /* End of IE parsing, look for another payload IE */ parsing_state = PARSING_PAYLOAD_IE; } diff --git a/core/net/mac/framer/framer-802154.c b/core/net/mac/framer/framer-802154.c index 39a936c95..5723d6805 100644 --- a/core/net/mac/framer/framer-802154.c +++ b/core/net/mac/framer/framer-802154.c @@ -43,16 +43,10 @@ #include "lib/random.h" #include -#define DEBUG 0 - -#if DEBUG -#include -#define PRINTF(...) printf(__VA_ARGS__) -#define PRINTADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7]) -#else -#define PRINTF(...) -#define PRINTADDR(addr) -#endif +/* Log configuration */ +#include "sys/log.h" +#define LOG_MODULE_STR "Frame 802.15.4e" +#define LOG_LEVEL FRAMER_LOG_LEVEL /** \brief The sequence number (0x00 - 0xff) added to the transmitted * data or MAC command frame. The default is a random value within @@ -180,13 +174,13 @@ create_frame(int type, int do_create) } else if(packetbuf_hdralloc(hdr_len)) { frame802154_create(¶ms, packetbuf_hdrptr()); - PRINTF("15.4-OUT: %2X", params.fcf.frame_type); - PRINTADDR(params.dest_addr); - PRINTF("%d %u (%u)\n", hdr_len, packetbuf_datalen(), packetbuf_totlen()); + LOG_INFO("Out: %2X", params.fcf.frame_type); + LOG_INFO_LLADDR((const linkaddr_t *)params.dest_addr); + LOG_INFO("%d %u (%u)\n", hdr_len, packetbuf_datalen(), packetbuf_totlen()); return hdr_len; } else { - PRINTF("15.4-OUT: too large header: %u\n", hdr_len); + LOG_ERR("Out: too large header: %u\n", hdr_len); return FRAMER_FAILED; } } @@ -218,7 +212,7 @@ parse(void) if(frame.dest_pid != frame802154_get_pan_id() && frame.dest_pid != FRAME802154_BROADCASTPANDID) { /* Packet to another PAN */ - PRINTF("15.4: for another pan %u\n", frame.dest_pid); + LOG_WARN("In: for another pan %u\n", frame.dest_pid); return FRAMER_FAILED; } if(!frame802154_is_broadcast_addr(frame.fcf.dest_addr_mode, frame.dest_addr)) { @@ -243,10 +237,10 @@ parse(void) } #endif /* LLSEC802154_USES_AUX_HEADER */ - PRINTF("15.4-IN: %2X", frame.fcf.frame_type); - PRINTADDR(packetbuf_addr(PACKETBUF_ADDR_SENDER)); - PRINTADDR(packetbuf_addr(PACKETBUF_ADDR_RECEIVER)); - PRINTF("%d %u (%u)\n", hdr_len, packetbuf_datalen(), packetbuf_totlen()); + LOG_INFO("In: %2X", frame.fcf.frame_type); + LOG_INFO_LLADDR(packetbuf_addr(PACKETBUF_ADDR_SENDER)); + LOG_INFO_LLADDR(packetbuf_addr(PACKETBUF_ADDR_RECEIVER)); + LOG_INFO("%d %u (%u)\n", hdr_len, packetbuf_datalen(), packetbuf_totlen()); return hdr_len; } diff --git a/core/net/mac/tsch/tsch-log.h b/core/net/mac/tsch/tsch-log.h index 6da6ba6e4..caf26e515 100644 --- a/core/net/mac/tsch/tsch-log.h +++ b/core/net/mac/tsch/tsch-log.h @@ -41,6 +41,14 @@ /******** Configuration *******/ +/* TSCH per-slot logging. Enabled by default if DBG is enabled */ +#ifdef TSCH_LOG_CONF_PER_SLOT +#define TSCH_LOG_PER_SLOT TSCH_LOG_CONF_PER_SLOT +#else /* TSCH_LOG_CONF_PER_SLOT */ +#include "sys/log.h" +#define TSCH_LOG_PER_SLOT (MAC_LOG_LEVEL >= LOG_LEVEL_DBG) +#endif /* TSCH_LOG_CONF_PER_SLOT */ + /* The length of the log queue, i.e. maximum number postponed log messages */ #ifdef TSCH_LOG_CONF_QUEUE_LEN #define TSCH_LOG_QUEUE_LEN TSCH_LOG_CONF_QUEUE_LEN @@ -55,16 +63,6 @@ #define TSCH_LOG_ID_FROM_LINKADDR(addr) ((addr) ? (addr)->u8[LINKADDR_SIZE - 1] : 0) #endif /* TSCH_LOG_ID_FROM_LINKADDR */ -/* TSCH log levels: - * 0: no log - * 1: basic PRINTF enabled - * 2: basic PRINTF enabled and tsch-log module enabled */ -#ifdef TSCH_LOG_CONF_PER_SLOT -#define TSCH_LOG_PER_SLOT TSCH_LOG_CONF_PER_SLOT -#else /* TSCH_LOG_CONF_PER_SLOT */ -#define TSCH_LOG_PER_SLOT 0 -#endif /* TSCH_LOG_CONF_PER_SLOT */ - #if (TSCH_LOG_PER_SLOT == 0) #define tsch_log_init() diff --git a/core/net/mac/tsch/tsch-packet.c b/core/net/mac/tsch/tsch-packet.c index 8835af7ac..d8a1b151d 100644 --- a/core/net/mac/tsch/tsch-packet.c +++ b/core/net/mac/tsch/tsch-packet.c @@ -361,9 +361,9 @@ tsch_packet_parse_eb(const uint8_t *buf, int buf_size, LOG_ERR("! parse_eb: frame is not a valid TSCH beacon. Frame version %u, type %u, FCF %02x %02x\n", frame->fcf.frame_version, frame->fcf.frame_type, buf[0], buf[1]); LOG_ERR("! parse_eb: frame was from 0x%x/", frame->src_pid); - LOG_ERR_LLADDR((const uip_lladdr_t *)&frame->src_addr); + LOG_ERR_LLADDR((const linkaddr_t *)&frame->src_addr); LOG_ERR(" to 0x%x/", frame->dest_pid); - LOG_ERR_LLADDR((const uip_lladdr_t *)&frame->dest_addr); + LOG_ERR_LLADDR((const linkaddr_t *)&frame->dest_addr); LOG_ERR("\n"); return 0; } diff --git a/core/net/mac/tsch/tsch-queue.c b/core/net/mac/tsch/tsch-queue.c index 41bfc04ee..b1275ff0a 100644 --- a/core/net/mac/tsch/tsch-queue.c +++ b/core/net/mac/tsch/tsch-queue.c @@ -52,6 +52,7 @@ #include "net/mac/tsch/tsch-queue.h" #include "net/mac/tsch/tsch-schedule.h" #include "net/mac/tsch/tsch-slot-operation.h" +#include "net/mac/tsch/tsch-log.h" #include /* Log configuration */ diff --git a/core/net/mac/tsch/tsch-slot-operation.c b/core/net/mac/tsch/tsch-slot-operation.c index 653d665ad..6f1749bd2 100644 --- a/core/net/mac/tsch/tsch-slot-operation.c +++ b/core/net/mac/tsch/tsch-slot-operation.c @@ -40,8 +40,8 @@ * */ -#include "contiki.h" #include "dev/radio.h" +#include "contiki.h" #include "net/netstack.h" #include "net/packetbuf.h" #include "net/queuebuf.h" @@ -59,12 +59,7 @@ #include "sys/cooja_mt.h" #endif /* CONTIKI_TARGET_COOJA || CONTIKI_TARGET_COOJA_IP64 */ -#if TSCH_LOG_LEVEL >= 1 -#define DEBUG DEBUG_PRINT -#else /* TSCH_LOG_LEVEL */ -#define DEBUG DEBUG_NONE -#endif /* TSCH_LOG_LEVEL */ -#include "net/net-debug.h" +#include /* TSCH debug macros, i.e. to set LEDs or GPIOs on various TSCH * timeslot events */ diff --git a/core/net/mac/tsch/tsch.c b/core/net/mac/tsch/tsch.c index a33c66c3b..31ade3bbe 100644 --- a/core/net/mac/tsch/tsch.c +++ b/core/net/mac/tsch/tsch.c @@ -938,7 +938,7 @@ send_packet(mac_callback_t sent, void *ptr) tsch_queue_packet_count(addr), p->header_len, queuebuf_datalen(p->qb)); - (void)packet_count_before; /* Discard "variable set but unused"warning in case of TSCH_LOG_LEVEL of 0 */ + (void)packet_count_before; /* Discard "variable set but unused" warning in case of TSCH_LOG_PER_SLOT */ } } if(ret != MAC_TX_DEFERRED) { diff --git a/core/sys/log-conf.h b/core/sys/log-conf.h index ac45254f4..357e75f14 100644 --- a/core/sys/log-conf.h +++ b/core/sys/log-conf.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Swedish Institute of Computer Science. +* Copyright (c) 2017, RISE SICS. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -61,9 +61,13 @@ #endif /* TCPIP_LOG_LEVEL */ #ifndef MAC_LOG_LEVEL -#define MAC_LOG_LEVEL LOG_LEVEL_WARN +#define MAC_LOG_LEVEL LOG_LEVEL_NONE #endif /* MAC_LOG_LEVELL */ +#ifndef FRAMER_LOG_LEVEL +#define FRAMER_LOG_LEVEL LOG_LEVEL_NONE +#endif /* FRAMER_LOG_LEVEL */ + #endif /* __LOG_CONF_H__ */ /** @} */ diff --git a/core/sys/log.c b/core/sys/log.c deleted file mode 100644 index 9be7b0c5d..000000000 --- a/core/sys/log.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2009, Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * This file is part of the Contiki operating system. - * - */ - -/** - * \file - * Per-module, per-level logging - * \author - * Simon Duquennoy - */ - -/** - * \addtogroup log - * @{ - */ - -#include "contiki-conf.h" -#include "sys/log.h" - -/*---------------------------------------------------------------------------*/ - - - -/** @} */ diff --git a/core/sys/log.h b/core/sys/log.h index 2d19e9eb9..c8182f024 100644 --- a/core/sys/log.h +++ b/core/sys/log.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Swedish Institute of Computer Science. + * Copyright (c) 2017, RISE SICS. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -66,7 +66,7 @@ void uip_debug_ipaddr_print(const uip_ipaddr_t *addr); #define LOG_LEVEL_ERR 1 /* Errors */ #define LOG_LEVEL_WARN 2 /* Warnings */ #define LOG_LEVEL_INFO 3 /* Basic info */ -#define LOG_LEVEL_DDG 4 /* Detailled debug */ +#define LOG_LEVEL_DBG 4 /* Detailled debug */ #define LOG_LEVEL_ANNOTATE 5 /* Cooja annotations */ /* Prefix all logs with file name and line-of-code */ @@ -119,23 +119,23 @@ void uip_debug_ipaddr_print(const uip_ipaddr_t *addr); #define LOG_ERR(...) LOG(LOG_LEVEL_ERR, __VA_ARGS__) #define LOG_WARN(...) LOG(LOG_LEVEL_WARN, __VA_ARGS__) #define LOG_INFO(...) LOG(LOG_LEVEL_INFO, __VA_ARGS__) -#define LOG_DBG(...) LOG(LOG_LEVEL_DDG, __VA_ARGS__) +#define LOG_DBG(...) LOG(LOG_LEVEL_DBG, __VA_ARGS__) #define LOG_ERR_LLADDR(...) LOG_LLADDR(LOG_LEVEL_ERR, __VA_ARGS__) #define LOG_WARN_LLADDR(...) LOG_LLADDR(LOG_LEVEL_WARN, __VA_ARGS__) #define LOG_INFO_LLADDR(...) LOG_LLADDR(LOG_LEVEL_INFO, __VA_ARGS__) -#define LOG_DBG_LLADDR(...) LOG_LLADDR(LOG_LEVEL_DDG, __VA_ARGS__) +#define LOG_DBG_LLADDR(...) LOG_LLADDR(LOG_LEVEL_DBG, __VA_ARGS__) #define LOG_ERR_6ADDR(...) LOG_6ADDR(LOG_LEVEL_ERR, __VA_ARGS__) #define LOG_WARN_6ADDR(...) LOG_6ADDR(LOG_LEVEL_WARN, __VA_ARGS__) #define LOG_INFO_6ADDR(...) LOG_6ADDR(LOG_LEVEL_INFO, __VA_ARGS__) -#define LOG_DBG_6ADDR(...) LOG_6ADDR(LOG_LEVEL_DDG, __VA_ARGS__) +#define LOG_DBG_6ADDR(...) LOG_6ADDR(LOG_LEVEL_DBG, __VA_ARGS__) /* For testing log level */ #define LOG_ERR_ENABLED (LOG_LEVEL >= LOG_LEVEL_ERR) #define LOG_WARN_ENABLED (LOG_LEVEL >= LOG_LEVEL_WARN) #define LOG_INFO_ENABLED (LOG_LEVEL >= LOG_LEVEL_INFO) -#define LOG_DBG_ENABLED (LOG_LEVEL >= LOG_LEVEL_DDG) +#define LOG_DBG_ENABLED (LOG_LEVEL >= LOG_LEVEL_DBG) #define LOG_ANNOTATE_ENABLED (LOG_LEVEL >= LOG_LEVEL_ANNOTATE) #endif /* __LOG_H__ */