From 440ea46775e3ffb5b4fe1e75a98a201267cbf8c5 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Fri, 29 Jul 2016 17:52:09 -0700 Subject: [PATCH] Add NCP as a log region option in logging.h (#304) This commit adds new log region for NCP (kLogRegionNcp). It also adds the support for posix platform logging implementation. --- examples/platforms/posix/logging.c | 4 ++++ include/platform/logging.h | 1 + 2 files changed, 5 insertions(+) diff --git a/examples/platforms/posix/logging.c b/examples/platforms/posix/logging.c index 83ffdc293..e3c762a67 100644 --- a/examples/platforms/posix/logging.c +++ b/examples/platforms/posix/logging.c @@ -103,6 +103,10 @@ void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat case kLogRegionMem: fprintf(stderr, "MEM "); break; + + case kLogRegionNcp: + fprintf(stderr, "NCP "); + break; } va_start(args, aFormat); diff --git a/include/platform/logging.h b/include/platform/logging.h index 16f71d51e..543835cb6 100644 --- a/include/platform/logging.h +++ b/include/platform/logging.h @@ -85,6 +85,7 @@ typedef enum otLogRegion kLogRegionIp6 = 6, ///< IPv6 kLogRegionMac = 7, ///< IEEE 802.15.4 MAC kLogRegionMem = 8, ///< Memory + kLogRegionNcp = 9, ///< NCP } otLogRegion; /**