File: logging.h

package info (click to toggle)
nvme-cli 2.15-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,472 kB
  • sloc: ansic: 76,987; sh: 2,258; python: 975; makefile: 66; ruby: 25
file content (24 lines) | stat: -rw-r--r-- 426 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* SPDX-License-Identifier: GPL-2.0-or-later */

#ifndef DEBUG_H_
#define DEBUG_H_

#include <stdbool.h>

#define print_info(...)				\
	do {					\
		if (log_level >= LOG_INFO)	\
			printf(__VA_ARGS__);	\
	} while (false)

#define print_debug(...)			\
	do {					\
		if (log_level >= LOG_DEBUG)	\
			printf(__VA_ARGS__);	\
	} while (false)

extern int log_level;

int map_log_level(int verbose, bool quiet);

#endif // DEBUG_H_