From dccda16850f6c6f717f0960cb1117844fc9785cd Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:50:34 +0800 Subject: [PATCH] feat update --- include/sled/log/log.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sled/log/log.h b/include/sled/log/log.h index 97c8285..eba5eeb 100644 --- a/include/sled/log/log.h +++ b/include/sled/log/log.h @@ -79,8 +79,8 @@ void Log(LogLevel level, const char *tag, const char *fmt, const char *file_name #define __LOG_EVERY_N(n, level, tag, fmt, ...) \ do { \ - static int __sled_log_count##__LINE__ = 0; \ - if (__sled_log_count##__LINE__++ % n == 0) { SLOG(level, tag, fmt, ##__VA_ARGS__); } \ + static int __sled_log_count##__FUNCTION__##__LINE__ = 0; \ + if (__sled_log_count##__FUNCTION__##__LINE__++ % n == 0) { SLOG(level, tag, fmt, ##__VA_ARGS__); } \ } while (0) #define LOGV_EVERY_N(n, tag, fmt, ...) __LOG_EVERY_N(n, sled::LogLevel::kTrace, tag, fmt, ##__VA_ARGS__)