38 #ifndef MAVROSFLIGHT_LOGGER_INTERFACE_H 39 #define MAVROSFLIGHT_LOGGER_INTERFACE_H 51 template <
typename Derived>
55 template <
typename... Args>
58 Derived& derived =
static_cast<Derived&
>(*this);
59 derived.debug(format, args...);
61 template <
typename... Args>
64 Derived& derived =
static_cast<Derived&
>(*this);
65 derived.debug_throttle(period, format, args...);
68 template <
typename... Args>
69 void info(
const char* format,
const Args&...
args)
71 Derived& derived =
static_cast<Derived&
>(*this);
72 derived.info(format, args...);
74 template <
typename... Args>
77 Derived& derived =
static_cast<Derived&
>(*this);
78 derived.info_throttle(period, format, args...);
81 template <
typename... Args>
82 void warn(
const char* format,
const Args&...
args)
84 Derived& derived =
static_cast<Derived&
>(*this);
85 derived.warn(format, args...);
87 template <
typename... Args>
90 Derived& derived =
static_cast<Derived&
>(*this);
91 derived.warn_throttle(period, format, args...);
94 template <
typename... Args>
97 Derived& derived =
static_cast<Derived&
>(*this);
98 derived.error(format, args...);
100 template <
typename... Args>
103 Derived& derived =
static_cast<Derived&
>(*this);
104 derived.error_throttle(period, format, args...);
107 template <
typename... Args>
110 Derived& derived =
static_cast<Derived&
>(*this);
111 derived.fatal(format, args...);
113 template <
typename... Args>
116 Derived& derived =
static_cast<Derived&
>(*this);
117 derived.fatal_throttle(period, format, args...);
122 #endif // MAVROSFLIGHT_LOGGER_INTERFACE_H void warn(const char *format, const Args &...args)
void info(const char *format, const Args &...args)
void error_throttle(float period, const char *format, const Args &...args)
void debug_throttle(float period, const char *format, const Args &...args)
void warn_throttle(float period, const char *format, const Args &...args)
Abstract base class for message handler.
void error(const char *format, const Args &...args)
void fatal(const char *format, const Args &...args)
void fatal_throttle(float period, const char *format, const Args &...args)
void debug(const char *format, const Args &...args)
void info_throttle(float period, const char *format, const Args &...args)