Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
lfs_log.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2024 Joshua DeWeese <josh.deweese@gmail.com>
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
27
#include "log.h"
28
29
#ifdef LFS_YES_TRACE
30
# define ENABLE_DEBUG 1
31
#endif
32
#include "
debug.h
"
33
40
#define _LFS_TRACE(fmt, ...) \
41
DEBUG("%s:%d: " fmt "%s\n", __FILE__, __LINE__, __VA_ARGS__)
42
50
#define _LFS_LOG(level, fmt, ...)\
51
LOG(level, "lfs: " fmt "%s\n", __VA_ARGS__)
52
59
61
#ifdef LFS_YES_TRACE
62
# define LFS_TRACE(...) _LFS_TRACE(__VA_ARGS__, "")
63
#else
64
# define LFS_TRACE(...)
65
#endif
66
68
#ifndef LFS_NO_DEBUG
69
# define LFS_DEBUG(...) _LFS_LOG(LOG_DEBUG, __VA_ARGS__, "")
70
#else
71
# define LFS_DEBUG(...)
72
#endif
73
75
#ifndef LFS_NO_WARN
76
# define LFS_WARN(...) _LFS_LOG(LOG_WARNING, __VA_ARGS__, "")
77
#else
78
# define LFS_WARN(...)
79
#endif
80
82
#ifndef LFS_NO_ERROR
83
# define LFS_ERROR(...) _LFS_LOG(LOG_ERROR, __VA_ARGS__, "")
84
#else
85
# define LFS_ERROR(...)
86
#endif
87
89
debug.h
Debug-header.
Generated on Sat Oct 3 2026 14:10:59 by
1.13.2