Skip to content

Commit e20a423

Browse files
authored
fix: log<lvl> -> report_fmt<lvl> to avoid unqualified name lookup issues (#23)
1 parent 5c89a34 commit e20a423

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

core/include/algorithms/logger.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,22 +192,22 @@ class LoggerMixin {
192192
void trace(std::string_view msg) const { report<LogLevel::kTrace>(msg); }
193193

194194
template <typename ...T> constexpr void critical(fmt::format_string<T...> fmt, T&&... args) const {
195-
log<LogLevel::kCritical>(fmt, std::forward<decltype(args)>(args)...);
195+
report_fmt<LogLevel::kCritical>(fmt, std::forward<decltype(args)>(args)...);
196196
}
197197
template <typename ...T> constexpr void error(fmt::format_string<T...> fmt, T&&... args) const {
198-
log<LogLevel::kError>(fmt, std::forward<decltype(args)>(args)...);
198+
report_fmt<LogLevel::kError>(fmt, std::forward<decltype(args)>(args)...);
199199
}
200200
template <typename ...T> constexpr void warning(fmt::format_string<T...> fmt, T&&... args) const {
201-
log<LogLevel::kWarning>(fmt, std::forward<decltype(args)>(args)...);
201+
report_fmt<LogLevel::kWarning>(fmt, std::forward<decltype(args)>(args)...);
202202
}
203203
template <typename ...T> constexpr void info(fmt::format_string<T...> fmt, T&&... args) const {
204-
log<LogLevel::kInfo>(fmt, std::forward<decltype(args)>(args)...);
204+
report_fmt<LogLevel::kInfo>(fmt, std::forward<decltype(args)>(args)...);
205205
}
206206
template <typename ...T> constexpr void debug(fmt::format_string<T...> fmt, T&&... args) const {
207-
log<LogLevel::kDebug>(fmt, std::forward<decltype(args)>(args)...);
207+
report_fmt<LogLevel::kDebug>(fmt, std::forward<decltype(args)>(args)...);
208208
}
209209
template <typename ...T> constexpr void trace(fmt::format_string<T...> fmt, T&&... args) const {
210-
log<LogLevel::kTrace>(fmt, std::forward<decltype(args)>(args)...);
210+
report_fmt<LogLevel::kTrace>(fmt, std::forward<decltype(args)>(args)...);
211211
}
212212

213213
bool aboveCriticalThreshold() const { return m_level >= LogLevel::kCritical; }
@@ -232,7 +232,7 @@ class LoggerMixin {
232232
}
233233

234234
template <LogLevel l, typename ...T>
235-
constexpr void log(fmt::format_string<T...> fmt, T&&... args) const {
235+
constexpr void report_fmt(fmt::format_string<T...> fmt, T&&... args) const {
236236
if (l >= m_level) {
237237
m_logger.report(l, m_caller, fmt::format(fmt, std::forward<decltype(args)>(args)...));
238238
}

0 commit comments

Comments
 (0)