Program Listing for File log.h

Return to documentation for file (microlith/detail/log.h)

#ifndef INCLUDE_MICROLITH_DETAIL_LOG_H_
#define INCLUDE_MICROLITH_DETAIL_LOG_H_

#ifndef MICROLITH_NO_SPDLOG
#define MICROLITH_NO_SPDLOG 0
#endif  // MICROLITH_NO_SPDLOG

#if MICROLITH_NO_SPDLOG
#include <spdlog/spdlog.h>
#define MICROLITH_TRACE(...) SPDLOG_TRACE(__VA_ARGS__)
#define MICROLITH_DEBUG(...) SPDLOG_DEBUG(__VA_ARGS__)
#define MICROLITH_INFO(...) SPDLOG_INFO(__VA_ARGS__)
#define MICROLITH_WARN(...) SPDLOG_WARN(__VA_ARGS__)
#define MICROLITH_ERROR(...) SPDLOG_ERROR(__VA_ARGS__)
#define MICROLITH_CRITICAL(...) SPDLOG_CRITICAL(__VA_ARGS__)
#define MICROLITH_OFF(...) SPDLOG_OFF(__VA_ARGS__)
#else
#ifndef MICROLITH_TRACE
#define MICROLITH_TRACE(...)
#endif  // MICROLITH_TRACE
#ifndef MICROLITH_DEBUG
#define MICROLITH_DEBUG(...)
#endif  // MICROLITH_DEBUG
#ifndef MICROLITH_INFO
#define MICROLITH_INFO(...)
#endif  // MICROLITH_INFO
#ifndef MICROLITH_WARN
#define MICROLITH_WARN(...)
#endif  // MICROLITH_WARN
#ifndef MICROLITH_ERROR
#define MICROLITH_ERROR(...)
#endif  // MICROLITH_ERROR
#ifndef MICROLITH_CRITICAL
#define MICROLITH_CRITICAL(...)
#endif  // MICROLITH_CRITICAL
#ifndef MICROLITH_OFF
#define MICROLITH_OFF(...)
#endif  // MICROLITH_OFF
#endif  // MICROLITH_NO_SPDLOG

#endif  // INCLUDE_MICROLITH_DETAIL_LOG_H_