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
24extern "C" {
25#endif
26
27#include "log.h"
28
36#define _LFS_LOG(level, fmt, ...)\
37 LOG(level, "lfs: " fmt "%s\n", __VA_ARGS__)
38
45
47#ifndef LFS_NO_DEBUG
48# define LFS_DEBUG(...) _LFS_LOG(LOG_DEBUG, __VA_ARGS__, "")
49#else
50# define LFS_DEBUG(...)
51#endif
52
54#ifndef LFS_NO_WARN
55# define LFS_WARN(...) _LFS_LOG(LOG_WARNING, __VA_ARGS__, "")
56#else
57# define LFS_WARN(...)
58#endif
59
61#ifndef LFS_NO_ERROR
62# define LFS_ERROR(...) _LFS_LOG(LOG_ERROR, __VA_ARGS__, "")
63#else
64# define LFS_ERROR(...)
65#endif
66
68