aboutsummaryrefslogtreecommitdiff
path: root/include/output.h
blob: 366e3c4c6af2b0c8c42aa83d9d007891dc7c5b57 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* SPDX-License-Identifier: Apache-2.0 */

/* Copyright 2025 Thorsten Töpper
 *
 * vim:ts=4:sw=4:expandtab
 */
#ifndef OUTPUT_H
#define OUTPUT_H

#include <stdio.h>

#ifndef LOGERR
#define LOGERR(...) {fprintf(stderr, "[%s:%d] %s: ", __FILE__, __LINE__, __func__); fprintf(stderr, __VA_ARGS__);}
#endif

#ifdef DEBUGBUILD
#define DBGTRC(...) LOGERR(__VA_ARGS__)
#else
#define DBGTRC(...)
#endif

#endif