WPILibC++ 2024.3.2
Logger.h File Reference
#include <functional>
#include <utility>
#include <fmt/format.h>

Go to the source code of this file.

Classes

class  wpi::Logger
 

Namespaces

namespace  wpi
 

Macros

#define WPI_LOG(logger_inst, level, format, ...)
 
#define WPI_ERROR(inst, format, ...)    WPI_LOG(inst, ::wpi::WPI_LOG_ERROR, format __VA_OPT__(, ) __VA_ARGS__)
 
#define WPI_WARNING(inst, format, ...)    WPI_LOG(inst, ::wpi::WPI_LOG_WARNING, format __VA_OPT__(, ) __VA_ARGS__)
 
#define WPI_INFO(inst, format, ...)    WPI_LOG(inst, ::wpi::WPI_LOG_INFO, format __VA_OPT__(, ) __VA_ARGS__)
 
#define WPI_DEBUG(inst, format, ...)    WPI_LOG(inst, ::wpi::WPI_LOG_DEBUG, format __VA_OPT__(, ) __VA_ARGS__)
 
#define WPI_DEBUG1(inst, format, ...)    WPI_LOG(inst, ::wpi::WPI_LOG_DEBUG1, format __VA_OPT__(, ) __VA_ARGS__)
 
#define WPI_DEBUG2(inst, format, ...)    WPI_LOG(inst, ::wpi::WPI_LOG_DEBUG2, format __VA_OPT__(, ) __VA_ARGS__)
 
#define WPI_DEBUG3(inst, format, ...)    WPI_LOG(inst, ::wpi::WPI_LOG_DEBUG3, format __VA_OPT__(, ) __VA_ARGS__)
 
#define WPI_DEBUG4(inst, format, ...)    WPI_LOG(inst, ::wpi::WPI_LOG_DEBUG4, format __VA_OPT__(, ) __VA_ARGS__)
 

Macro Definition Documentation

◆ WPI_DEBUG

#define WPI_DEBUG (   inst,
  format,
  ... 
)     WPI_LOG(inst, ::wpi::WPI_LOG_DEBUG, format __VA_OPT__(, ) __VA_ARGS__)

◆ WPI_DEBUG1

#define WPI_DEBUG1 (   inst,
  format,
  ... 
)     WPI_LOG(inst, ::wpi::WPI_LOG_DEBUG1, format __VA_OPT__(, ) __VA_ARGS__)

◆ WPI_DEBUG2

#define WPI_DEBUG2 (   inst,
  format,
  ... 
)     WPI_LOG(inst, ::wpi::WPI_LOG_DEBUG2, format __VA_OPT__(, ) __VA_ARGS__)

◆ WPI_DEBUG3

#define WPI_DEBUG3 (   inst,
  format,
  ... 
)     WPI_LOG(inst, ::wpi::WPI_LOG_DEBUG3, format __VA_OPT__(, ) __VA_ARGS__)

◆ WPI_DEBUG4

#define WPI_DEBUG4 (   inst,
  format,
  ... 
)     WPI_LOG(inst, ::wpi::WPI_LOG_DEBUG4, format __VA_OPT__(, ) __VA_ARGS__)

◆ WPI_ERROR

#define WPI_ERROR (   inst,
  format,
  ... 
)     WPI_LOG(inst, ::wpi::WPI_LOG_ERROR, format __VA_OPT__(, ) __VA_ARGS__)

◆ WPI_INFO

#define WPI_INFO (   inst,
  format,
  ... 
)     WPI_LOG(inst, ::wpi::WPI_LOG_INFO, format __VA_OPT__(, ) __VA_ARGS__)

◆ WPI_LOG

#define WPI_LOG (   logger_inst,
  level,
  format,
  ... 
)
Value:
if ((logger_inst).HasLogger() && level >= (logger_inst).min_level()) { \
(logger_inst) \
.Log(level, __FILE__, __LINE__, \
FMT_STRING(format) __VA_OPT__(, ) __VA_ARGS__); \
}
#define FMT_STRING(s)
\rst Constructs a compile-time format string from a string literal s.
Definition: format.h:1912
auto format(wformat_string< T... > fmt, T &&... args) -> std::wstring
Definition: xchar.h:108

◆ WPI_WARNING

#define WPI_WARNING (   inst,
  format,
  ... 
)     WPI_LOG(inst, ::wpi::WPI_LOG_WARNING, format __VA_OPT__(, ) __VA_ARGS__)