[logging] remove deprecated use of OPENTHREAD_ENABLE_CLI_LOGGING (#2605)

This commit is contained in:
Jonathan Hui
2018-03-13 18:10:11 +00:00
committed by GitHub
parent 51c62a29d0
commit 0dd689752c
2 changed files with 1 additions and 33 deletions
-11
View File
@@ -34,24 +34,13 @@
#include <openthread-core-config.h>
#include <openthread/config.h>
#include <openthread/cli.h>
#include <openthread/platform/logging.h>
#include "utils/code_utils.h"
#if (OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED)
void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...)
{
#if OPENTHREAD_ENABLE_CLI_LOGGING
va_list args;
va_start(args, aFormat);
otCliLog(aLogLevel, aLogRegion, aFormat, args);
va_end(args);
#else
(void)aLogLevel;
(void)aLogRegion;
(void)aFormat;
#endif // OPENTHREAD_ENABLE_CLI_LOGGING
}
#endif
+1 -22
View File
@@ -32,36 +32,15 @@
*
*/
#include "fsl_device_registers.h"
#include <stdint.h>
#include <openthread-core-config.h>
#include <openthread/config.h>
#include "openthread/platform/logging.h"
#if OPENTHREAD_ENABLE_CLI_LOGGING
#include <ctype.h>
#include <inttypes.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <cli/cli-uart.h>
#include <utils/code_utils.h>
#endif
#include <openthread/platform/logging.h>
#if (OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED)
void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...)
{
#if OPENTHREAD_ENABLE_CLI_LOGGING
va_list args;
va_start(args, aFormat);
otCliLog(aLogLevel, aLogRegion, aFormat, args);
va_end(args);
#else
(void)aLogLevel;
(void)aLogRegion;
(void)aFormat;
#endif // OPENTHREAD_ENABLE_CLI_LOGGING
}
#endif