chromium/third_party/cpuinfo/src/src/cpuinfo/log.h

#pragma once

#include <inttypes.h>
#include <stdarg.h>
#include <stdlib.h>

#ifndef CPUINFO_LOG_LEVEL
#error "Undefined CPUINFO_LOG_LEVEL"
#endif

#define CPUINFO_LOG_NONE
#define CPUINFO_LOG_FATAL
#define CPUINFO_LOG_ERROR
#define CPUINFO_LOG_WARNING
#define CPUINFO_LOG_INFO
#define CPUINFO_LOG_DEBUG

#ifndef CPUINFO_LOG_DEBUG_PARSERS
#define CPUINFO_LOG_DEBUG_PARSERS
#endif

#ifdef __cplusplus
extern "C" {
#endif

#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_DEBUG
void cpuinfo_vlog_debug(const char* format, va_list args);
#endif

#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_INFO
void cpuinfo_vlog_info(const char* format, va_list args);
#endif

#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_WARNING
void cpuinfo_vlog_warning(const char* format, va_list args);
#endif

#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_ERROR
void cpuinfo_vlog_error(const char* format, va_list args);
#endif

#if CPUINFO_LOG_LEVEL >= CPUINFO_LOG_FATAL
void cpuinfo_vlog_fatal(const char* format, va_list args);
#endif

#ifdef __cplusplus
} // extern "C"
#endif

#ifndef CPUINFO_LOG_ARGUMENTS_FORMAT
#ifdef __GNUC__
#define CPUINFO_LOG_ARGUMENTS_FORMAT
#else
#define CPUINFO_LOG_ARGUMENTS_FORMAT
#endif
#endif

CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_debug(const char* format, ...) {}

CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_info(const char* format, ...) {}

CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_warning(const char* format, ...) {}

CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_error(const char* format, ...) {}

CPUINFO_LOG_ARGUMENTS_FORMAT inline static void cpuinfo_log_fatal(const char* format, ...) {}