1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/dist/tools/uhcpd/log.h
Benjamin Valentin f163f1580b sys/net/uhcp: use LOG_ functions
Using `gnrc_border_router` with `uhcp` is quite noisy.
uhcpc will regularly refresh the prefix and print a bunch of status messages.

Allow the user to tone it down by setting a higher `LOG_LEVEL`.
For this, convert calls to `printf()` and `puts()` to `LOG_xxx()`.

This requires a dummy header for `uhcpd`.
2020-09-29 09:55:28 +02:00

47 lines
1.0 KiB
C

/*
* Copyright (C) 2020 ML!PA Consulting GmbH
*
* 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 core_util
* @{
*
* @file
* @brief System logging dummy header
*
* This header offers a bunch of "LOG_*" functions that just use printf,
* without honouring a verbosity level.
*
* This is a dummy header for the purpose of sharing code that uses the
* LOG_xxx() functions between RIOT and host utilities without having to
* manually include all dependencies of the 'real' log module.
*
* @author Benjamin Valentin <benjamin.valentin@ml-pa.com>
*/
#ifndef LOG_H
#define LOG_H
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name Logging convenience defines
* @{
*/
#define LOG_ERROR(...) printf(__VA_ARGS__)
#define LOG_WARNING(...) printf(__VA_ARGS__)
#define LOG_INFO(...) printf(__VA_ARGS__)
#define LOG_DEBUG(...) printf(__VA_ARGS__)
/** @} */
#endif /* LOG_H */
/** @} */