1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/openthread/contrib/platform_logging.c
Jose Alamos f7afc79bab pkg/openthread: remove openthread header from contrib
The internal Openthread config file is not needed for the contrib
files, since it only includes internal OpenThread configuration
(use by the Openthread build system). Under certain cases some
macros defined in Openthread collide with RIOT internals or vendor
headers. So it's important to keep dependencies consistent.
2019-07-08 14:04:49 +02:00

41 lines
1.0 KiB
C

/*
* Copyright (C) 2017 Fundacion Inria Chile
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @{
* @ingroup net
* @file
* @brief Implementation of OpenThread logging platform abstraction
*
* @author Jose Ignacio Alamos <jialamos@uc.cl>
* @author Baptiste Clenet <bapclenet@gmail.com>
* @}
*/
#include <ctype.h>
#include <inttypes.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include "openthread/platform/logging.h"
/* adapted from OpenThread posix example:
* See: https://github.com/openthread/openthread/blob/master/examples/platforms/posix/logging.c */
__attribute__((__format__ (__printf__, 3, 4)))
void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...)
{
(void) aLogLevel;
(void) aLogRegion;
va_list args;
va_start(args, aFormat);
vfprintf(stderr, aFormat, args);
fprintf(stderr, "\n");
va_end(args);
}