diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-14 18:27:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-16 15:11:56 +0000 |
commit | 6197903bd42478987516bc4cc3f0769488a37065 (patch) | |
tree | 508d399340039960289dd1d96696db7c56c22321 /util/log.h | |
parent | Adding upstream version 1.16. (diff) | |
download | nvme-cli-6197903bd42478987516bc4cc3f0769488a37065.tar.xz nvme-cli-6197903bd42478987516bc4cc3f0769488a37065.zip |
Adding upstream version 2.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'util/log.h')
-rw-r--r-- | util/log.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/util/log.h b/util/log.h deleted file mode 100644 index 15107a5..0000000 --- a/util/log.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2021 Martin Wilck, SUSE LLC - * SPDX-License-Identifier: LGPL-2.1-or-newer - */ -#ifndef _LOG_H -#define _LOG_H - -#ifndef MAX_LOGLEVEL -# define MAX_LOGLEVEL LOG_DEBUG -#endif -#ifndef DEFAULT_LOGLEVEL -# define DEFAULT_LOGLEVEL LOG_NOTICE -#endif - -#if (LOG_FUNCNAME == 1) -#define _log_func __func__ -#else -#define _log_func NULL -#endif - -extern int log_level; -extern bool log_timestamp; -extern bool log_pid; - -void __attribute__((format(printf, 3, 4))) -__msg(int lvl, const char *func, const char *format, ...); - -#define msg(lvl, format, ...) \ - do { \ - if ((lvl) <= MAX_LOGLEVEL) \ - __msg(lvl, _log_func, format, ##__VA_ARGS__); \ - } while (0) - -#endif /* _LOG_H */ |